Photosynthesis is the process by which plants and some bacteria use energy from sunlight, carbon dioxide, and water to produce glucose and oxygen. It occurs in chloroplasts, which contain the green pigment chlorophyll. The light reaction uses chlorophyll to absorb sunlight, and the energy from sunlight is then used in the dark reaction to produce glucose from carbon dioxide and water. The overall chemical equation shows that light energy is converted to the chemical energy stored in glucose.