Photosynthesis is the process by which plants and other autotrophs convert sunlight, carbon dioxide, and water into oxygen and energy-rich organic compounds like glucose. It occurs in chloroplasts, which contain chlorophyll and other pigments. Photosynthesis has two phases - the light reactions where light energy is absorbed and converted to chemical energy carriers, and the dark reactions where the chemical energy is used to fix carbon dioxide and produce sugars.