Free oxygen gas was almost nonexistent in Earth's atmosphere before photosynthetic archaea and bacteria evolved, probably about 3.5 billion years ago.
When did photosynthetic organisms evolve on Earth?
3.5 billion years ago