Photosynthesis is the process by which plants use sunlight, carbon dioxide and water to produce glucose and oxygen. Chlorophyll in the leaves absorbs sunlight and chloroplasts use it in light reactions to produce ATP and NADPH, providing energy to convert carbon dioxide into glucose, a sugar that plants can use as food or to build other molecules like cellulose. Oxygen is released as a byproduct in the process.