To better illustrate the materials need for the photosynthesis, it would be appropriate to write the chemical reaction of the entire process of photosynthesis.
carbon dioxide + water ----light energy--> glucose + oxygen
6CO2 + 6H2O -----light energy----> C6H12O6 + 6O2
The light energy will be trapped in the chlorophyll (a pigment found in the cells of photosynthetic organism, for example plants) that will be used eventually to excite the electrons. That excited electrons will transfer its energy to form ATP and NADPH that will be utilized to produce glucose. Oxygen is produced earlier when H2O absorbs the energy to release the excited electrons.