Algae have photosynthetic machinery ultimately derived from cyanobacteria that produce oxygen as a by-product of photosynthesis, unlike other photosynthetic bacteria such as purple and green sulfur bacteria.
On a global scale, plants and other photosynthetic organisms have generated all of the oxygen in the air.