These are photosynthetic bacteria found in water and moist soil of which some are nitrogen-fixing bacteria. They are green in color due to the presence of phycocyanin (blue pigment) and chlorophyll (green pigment). These two pigments help capture the light energy of the sun.
Anaerobic conditions are required because nitrogen fixation cannot be performed in the presence of oxygen. This is achieved using an atypical cell called heterocysts. When nitrogen is deficient, some special nitrogen-fixing cells called heterocysts are formed. An enzyme nitrogenase is used to fix the nitrogen in cells.
Cyanobacteria are free-living cyanobacteria found in rice field water.
These cyanobacteria grow on the green algae's surface as epiphytes.
During photosynthesis, they can fix not only atmospheric nitrogen but also carbon from carbon dioxide. Examples: Nostoc, and Anabaena.