To perform photosynthesis, plants need three things: carbon dioxide, water, and sunlight. By taking in water (H2O) through the roots, carbon dioxide (CO2) from the air, and light energy from the Sun, plants can perform photosynthesis to make glucose (sugars) and oxygen (O2).