How is oxygen related to photosynthesis?
The light reaction of photosynthesis splits water to form hydrogen ions and oxygen gas. The hydrogen ions are used to make ATP.
Later in the dark reaction, the Calvin cycle is used to make 3-carbon molecules which are used to make glucose (the other chemical product of photosynthesis.
Here is a video of oxygen being formed in the light reaction of photosynthesis.
Video from: Noel Pauller