Answer is: cyanobacteria.
Cyanobacteria are a phylum of bacteria that obtain their energy through photosynthesis and are the only photosynthetic prokaryotes able to produce oxygen.
Cyanobacteria are thought to have converted the early oxygen-poor, reducing atmosphere into an oxidizing one, causing the Great Oxygenation Event which dramatically changed the composition of the Earth's life forms and led to the near-extinction of anaerobic organisms.