Photosynthesis
Oxygen is produced as a result of photosynthesis and released into the atmosphere through respiration. All the oxygen in the atmosphere has its origin in plants (including those microorganisms which do photosynthesis).