Plants produce their own food by a process called photosynthesis. The green colour we see in leaves is due to a pigment called chlorophyll. Chlorophyll combines water and a gas (carbon dioxide) using light to make sugar (glucose) and oxygen.
water + carbon dioxide + (light) → glucose + oxygen