Plants use a process called photosynthesis to convert sunlight into food. During photosynthesis, plants take in carbon dioxide from the air, water from the soil, and sunlight. Using the energy from sunlight, plants combine carbon dioxide and water to produce glucose (sugar) and oxygen as a byproduct. This glucose is used as food for the plant to grow and thrive.