The interplay among environmental chemistry, organismal evolution and microbial stress responses contributed to the preservation of a nearly 3.5 billion-year long record of microbial life by silica, carbonate and clay minerals. In this talk, I will use the genomic and fossil records of Cyanobacteria, the organismal lineage with the oldest fossil record, to ask when this photosynthetic lineage evolved the critical ability to produce oxygen. I will then present results of experimental work that shows the ability of cyanobacteria to promote their own fossilization by precipitating silica and carbonate minerals. These results help constrain the concentrations of silica in marine environments more than two billion years ago, explain the preservation of exquisite cyanobacterial fossils in chert lenses associated with Proterozoic carbonate deposits and can inform the search for signs of past life on Mars.