Photosynthesis is the process by which plants, algae, and some bacteria convert light energy to chemical energy stored in carbohydrates. It occurs in chloroplasts and involves two stages: the light reactions convert solar energy to ATP and NADPH, while the Calvin cycle uses these products to fix carbon from carbon dioxide into sugars. The light reactions take place on the thylakoid membranes and involve two photosystems that work together to transfer electrons and pump protons, generating a proton gradient used to make ATP via chemiosmosis.