Two major modes of nutrition in bacteria exist: Autotrophs and Heterotrophs.
Autotrophs are of two types:
Photoautotrophs: The bacteria that use light energy, CO2 as their carbon source and an inorganic electron source (Examples: H2, H2S) are called Photoautotrophs
Chemoautotrophs: The bacteria that obtain energy by oxidizing inorganic compounds and use CO2 as their sole source of carbon are called Chemoautotrophs. These include nitrifying bacteria, iron bacteria and sulphur bacteria.
Heterotrophs are of two types:
Photoheterotrophs: Bacteria that use light energy and organic electron donors as well as simple organic molecules rather than CO2 as the source of carbon are called as Photoheterotrophs. These include Purple and Green Bacteria
Chemoheterotrophs: Bacteria which use organic compounds as source of energy, electrons, hydrogen and carbon for biosynthesis are called Chemoheterotrophs.