Stromatolites are solid, laminar structures of biological origin. Living examples are sparsely distributed and formed by cyanobacteria, which are oxygenic phototrophs. However, stromatolites were abundant between 3.4 and 2.4 Gyr, prior to the advent of cyanobacteria and oxygenic photosynthesis. Here I propose that many Archaean stromatolites were seeded at points of efflux of hydrogen sulfide from hydrothermal fields into shallow water, while their laminar composition arose from alternating modes of strictly anoxygenic photosynthetic metabolism. These changes were a redox regulatory response of gene expression to changing hydrogen sulfide concentration, which fluctuated with intermittent dilution by tidal action or by rainfall into surface waters. The proposed redox switch between modes of metabolism deposited sequential microbial mats. These mats gave rise to alternating carbonate sediments predicted to retain evidence of their origin in differing ratios of isotopes of carbon and sulfur and in organic content. The mats may have arisen either by replacement of microbial populations or by continuous lineages of protocyanobacteria in which a redox genetic switch selected between Types I and II photosynthetic reaction centers, and thus between photolithoautotrophic and photoorganoheterotrophic metabolism. In the latter case, and by 2.4 Gyr at the latest, a mutation had disabled the redox genetic switch to give simultaneous constitutive expression of both Types I and II reaction centers, and thus to the ability to extract electrons from manganese and then water. By this simple step, the first cyanobacterium had the dramatic advantage of emancipation from limiting supplies of inorganic electron donors, produced free molecular oxygen as a waste product, and initiated the Great Oxidation Event in Earth’s history at the transition from the Archaean to the Paleoproterozoic.