Photosynthesis is the process by which plants, algae, and some bacteria use sunlight, water, and carbon dioxide to produce oxygen and energy in the form of ATP and NADPH. It takes place in two stages - the light reactions where light energy is captured to make ATP and NADPH, and the dark reactions where ATP and NADPH are used to incorporate carbon from CO2 into organic compounds like glucose. The chloroplast is the organelle where photosynthesis takes place, containing chlorophyll pigments in the thylakoid membranes which absorb light energy to drive the light-dependent reactions.