Green plants use a process called photosynthesis to make food. During photosynthesis, plants take in carbon dioxide from the air, water from the soil, and sunlight. They then use these ingredients to produce glucose (sugar) and oxygen. The glucose is used as a source of energy for the plant, while the oxygen is released into the atmosphere as a byproduct.