Available evidence from geobiological studies of Archean (>2500 Ma) sedimentary rocks indicates that life existed 3500 Ma. Fossils of what are thought to be filamentous photosynthetic organisms have been dated at 3.4 billion years old, consistent with recent studies of photosynthesis. Early photosynthetic systems, such as those from green and purple sulfur and green and purple nonsulfur bacteria, are thought to have been anoxygenic, using various molecules as electron donors. Green and purple sulfur bacteria are thought to have used hydrogen and hydrogen sulfide as electron and hydrogen donors. Green nonsulfur bacteria used various amino and other organic acids. Purple nonsulfur bacteria used a variety of nonspecific organic and inorganic molecules. It is suggested that photosynthesis likely originated at low-wavelength geothermal light from acidic hydrothermal vents, Zn-tetrapyrroles were the first photochemically active pigments, the photosynthetic organisms were anaerobic and relied on  without relying on H emitted by alkaline hydrothermal vents. The divergence of anoxygenic photosynthetic organisms at the photic zone could have led to the ability to strip electrons from  more efficiently under ultraviolet radiation. There is geochemical evidence that suggests that anaerobic photosynthesis emerged 3.3 to 3.5 billion years ago. The organisms later developed a Chlorophyll F synthase. They could have also stripped electrons from soluble metal ions although it is unknown.
The first oxygenic photosynthetic organisms are proposed to be -dependent. It is also suggested photosynthesis originated under sunlight, using  emitted by volcanoes and hydrothermal vents which ended the need for scarce H emitted by alkaline hydrothermal vents. Oxygenic photosynthesis uses water as an electron donor, which is oxidized to molecular oxygen () in the photosynthetic reaction center. The biochemical capacity for oxygenic photosynthesis evolved in a common ancestor of extant cyanobacteria. The first appearance of free oxygen in the atmosphere is sometimes referred to as the oxygen catastrophe. The geological record indicates that this transforming event took place during the Paleoproterozoic era at least 2450–2320 million years ago (Ma), and, it is speculated, much earlier. A clear paleontological window on cyanobacterial evolution opened about 2000 Ma, revealing an already-diverse biota of blue-greens. Cyanobacteria remained principal primary producers throughout the Proterozoic Eon (2500–543 Ma), in part because the redox structure of the oceans favored photoautotrophs capable of nitrogen fixation. Green algae joined blue-greens as major primary producers on continental shelves near the end of the Proterozoic, but only with the Mesozoic (251–65 Ma) radiations of dinoflagellates, coccolithophorids, and diatoms did primary production in marine shelf waters take modern form. Cyanobacteria remain critical to marine ecosystems as primary producers in oceanic gyres, as agents of biological nitrogen fixation, and, in modified form, as the plastids of marine algae. Modern photosynthesis in plants and most photosynthetic prokaryotes is oxygenic.