Plants use sunlight to produce food through a process called photosynthesis. In photosynthesis, plants use the energy from sunlight to convert carbon dioxide and water into glucose (sugar) and oxygen. This process takes place in the chloroplasts of plant cells, where the pigment chlorophyll captures sunlight and initiates the chemical reactions that produce food for the plant.