universetoday.com
The Origins of Oxygen on Earth
Oxygen is one of the most important elements on Earth to life, and it comprises a fifth of our atmosphere. It's a volatile element, so it can't exist in large quantities unless something, like life, is continually producing it. The mainstream view is that plants evolved oxygen photosynthesis early on, and then produced large amounts of oxygen. Another view, tested under laboratory conditions, is that when volcanic rocks weather, they release oxygen into the atmosphere. Perhaps it's a combination of these factors that built up our oxygen.
Fraser Cain