Photosynthetic organisms are photoautotrophs, which means that they are able to synthesize food directly from carbon dioxide and water using energy from light. However, not all organisms that use light as a source of energy carry out photosynthesis, since photoheterotrophs use organic compounds, rather than carbon dioxide, as a source of carbon. In plants, algae and cyanobacteria, photosynthesis releases oxygen. This is called oxygenic photosynthesis
Your vote on this answer has already been received
The Hydrogen ion is added to take the place of the energized electron in the light reaction of photosynthesis. The Hydrogen electron is taken from an H2O molecule. The oxygen is released as a waste product and the rest of the Hydrogen goes off to do work as energy is released.