Beneficial bacteria
Bacteria are used in sewage treatment to break down wastes.
Strains of bacteria exist that can feed on petroleum. These have been used to clean up oil spills. Others can extract metals from mining waste, and are becoming used in mining and in environmental clean-up.
As a byproduct of photosynthesis, blue-green bacteria, or cyanobacteria, produce much of the oxygen that we and other organisms breathe.