Light reactions harvest photons and make ATP and NADPH
Photosynthesis splits into two phases. Light reactions occur in the thylakoid membrane and require photons. Photosystem II absorbs light and uses the energy to split water molecules, releasing oxygen as a byproduct. The electrons from water flow through an electron transport chain (similar to mitochondria but run backwards), pumping protons to build a gradient. Photosystem I absorbs more photons and boosts electrons to a high energy state, where they reduce NADP+ to NADPH. The proton gradient drives ATP synthase, making ATP.
The net result of light reactions: 2 NADPH + 3 ATP + O2, produced using energy from light. The oxygen is released to the atmosphere (a gift to aerobic life). NADPH and ATP are the energy and reducing power needed for the next phase.
Calvin cycle fixes CO2 into sugar
The Calvin cycle occurs in the stroma and does not require light directly, though it depends on the ATP and NADPH from light reactions. CO2 is fixed by the enzyme RuBisCO, combining with a 5-carbon sugar (ribulose-1,5-bisphosphate, RuBP) to form an unstable 6-carbon intermediate that splits into two 3-carbon sugars (3-phosphoglycerate). These 3-carbon sugars are reduced using NADPH and phosphorylated using ATP to form glyceraldehyde-3-phosphate (G3P).
Most of the G3P is used to regenerate RuBP, but some is exported to the cytoplasm where it is assembled into glucose or other carbohydrates. The cycle turns six times to fix one CO2 (three turns to produce one net G3P that exits the cycle). Photosynthesis as a whole: 6 CO2 + 6 H2O + light energy -> 1 glucose + 6 O2. This reaction reversed all of respiration and is the ultimate source of organic matter and oxygen for nearly all life on Earth.