Photosynthesis is the process by which plants use carbon dioxide, water, and sunlight to produce glucose and oxygen. It involves two stages: the light-dependent reactions where ATP and NADPH are produced, and the light-independent reactions of the Calvin cycle where glucose is produced from carbon dioxide using ATP and NADPH. The light reactions take place in the thylakoid membranes of chloroplasts and use energy from sunlight to drive the synthesis of ATP and NADPH via photophosphorylation.