(1) Chloroplasts contain the light-dependent reactions of photosynthesis, which capture energy from sunlight and use it to produce ATP and NADPH. (2) These reactions occur in the thylakoid membranes through two photosystems that absorb light and transfer electrons. This powers an electron transport chain that pumps protons across the membrane. (3) The resulting proton gradient drives ATP synthesis when protons diffuse back through ATP synthase. Oxygen is also released as a byproduct of splitting water.