Here's how it works:
* Sunlight contains energy in the form of photons.
* Chlorophyll, a green pigment found in plants, absorbs these photons.
* The absorbed light energy is used to split water molecules (H₂O) into hydrogen ions (H+) and oxygen (O₂).
* This energy is also used to convert carbon dioxide (CO₂) into sugars, which the plant uses for growth and energy.
So, in a nutshell, sunlight is the primary source of energy for photosynthesis.