Plants need water, carbon dioxide, and light in order to produce food through the process of photosynthesis. During photosynthesis, plants take in carbon dioxide and water and use energy from sunlight to produce sugar molecules and oxygen as a byproduct. The sugar molecules produced by plants provide them with chemical energy and are also the food source for animals that eat plants.