Photosynthesis produces oxygen and water. Photosynthesis is the result of a cycle. Humans use oxygen for respiration, the product produced from human respiration is carbon dioxide. Then plants absorb carbon dioxide from the air and turn it into oxygen with photosynthesis, this goes on and on as a cycle.
Without an oxygen atmosphere very few things could live on the early Earth. Anaerobic bacteria were probably the first living things on Earth. The early Earth had no oceans and was frequently hit with meteorites and asteroids.