They are so called due to their blue-green pigmentation. They are photosynthetic and aquatic.
However you must remember the following point:
This name is convenient for talking about organisms in the water that make their own food, but does not reflect any relationship between the cyanobacteria and other organisms called algae. Cyanobacteria are relatives of the bacteria, not eukaryotes, and it is only the chloroplast in eukaryotic algae to which the cyanobacteria are related.