When cyanobacteria originated and diversified, and what their ancient traits were, remain critical unresolved problems. Here, we used a phylogenomic approach to construct a well-resolved 'core' cyanobacterial tree. The branching positions of four lineages (Thermosynechococcus elongatus, Synechococcus elongatus, Synechococcus PCC 7335 and Acaryochloris marina) were problematic, probably due to long branch attraction artifacts. A consensus genomic tree was used to study trait evolution using ancestral state reconstruction (ASR). The early cyanobacteria were probably unicellular, freshwater, had small cell diameters, and lacked the traits to form thick microbial mats. Relaxed molecular clock analyses suggested that early cyanobacterial lineages were restricted to freshwater ecosystems until at least 2.4 Ga, before diversifying into coastal brackish and marine environments. The resultant increases in niche space and nutrient availability, and consequent sedimentation of organic carbon into the deep oceans, would have generated large pulses of oxygen into the biosphere, possibly explaining why oxygen rose so rapidly. Rapid atmospheric oxidation could have destroyed the methane-driven greenhouse with simultaneous drawdown in pCO(2), precipitating 'Snowball Earth' conditions. The traits associated with the formation of thick, laminated microbial mats (large cell diameters, filamentous growth, sheaths, motility and nitrogen fixation) were not seen until after diversification of the LPP, SPM and PNT clades, after 2.32 Ga. The appearance of these traits overlaps with a global carbon isotopic excursion between 2.2 and 2.1 Ga. Thus, a massive re-ordering of biogeochemical cycles caused by the appearance of complex laminated microbial communities in marine environments may have caused this excursion. Finally, we show that ASR may provide an explanation for why cyanobacterial microfossils have not been observed until after 2.0 Ga, and make suggestions for how future paleobiological searches for early cyanobacteria might proceed. In summary, key evolutionary events in the microbial world may have triggered some of the key geologic upheavals on the Paleoproterozoic Earth.