3.4 billion years ago
All life needs energy to survive, and the biggest source of energy for life on Earth is the Sun. Some of the early micro-organisms evolved a way to use the energy from sunlight to make sugars out of simpler molecules. This process is called photosynthesis. But unlike green plants today, the first photosynthesising organisms did not release oxygen as a waste product, so there was no oxygen in the air.
See other: History of Life