Plants convert sunlight into energy through a process called photosynthesis. During photosynthesis, plants use a pigment called chlorophyll to capture sunlight. This sunlight is then used to convert carbon dioxide from the air and water from the soil into glucose (sugar), which is the plant's source of energy. This process also releases oxygen as a byproduct, which is essential for all living organisms on Earth.