Plants use sunlight to convert water and carbon dioxide into energy-rich sugars and oxygen in various ways (photosynthesis).