Early atmosphere of earth had less oxygen (had more carbon dioxide and ammonia) hence was a non-reducing atmosphere. Most bacteria that thrived were anaerobes. However, the emergence of cyanobacteria approximately 3.5 million years ago filled the atmosphere with oxygen. This is because cyanobacteria respire out oxygen. The atmosphere thenceforth became reducing and hence most anaerobes perished while aerobics thrived. This is referred to as the Great Oxidization Event. The formation of ozone layer also enabled thriving of life since the UV light from sunlight was blocked and hecne could not damage organic molecules.