Photosynthesis is the process by which plants use sunlight, carbon dioxide, and water to produce oxygen and energy in the form of sugar. It occurs through the chlorophyll in leaves, which captures sunlight that is then used to combine carbon dioxide and water into oxygen and glucose. The glucose provides an energy source for the plant. Photosynthesis requires sunlight, carbon dioxide from the air, and water from the soil to function.