The chlorophyll on exposure to light energy becomes activated by absorbing photons.
The absorbed energy is used in splitting the water molecule (H2O) into its two components (Hydrogen and Oxygen) and releasing electrons.
Energy of 4 photons
2H2O --------------> 4H+ + 4 e- + O2
The reaction is known as photolysis of water.