Photosynthesis is the process in which energy from sunlight is used to convert carbon dioxide and water into glucose and oxygen. Chlorophyll in a plant's leaves absorbs energy from sunlight. The energy-rich glucose is transported around the plant as food, but can also be used to form more complex chemical substances. These include cellulose , which is used to build the walls of plant cells.