Photosynthesis is the making of food by plants. The essential ingredients in making this food are sunlight, the chlorophyll that is present in green plants, water and carbon dioxide in the air. Photosynthesis is necessary not just for plants to make food for themselves, but for animals, including us eventually.
Sunlight is used to break down the water in the plant into oxygen which the plant gives off and we use to breathe. The hydrogen is then used with the carbon dioxide to create the food for the plants and ultimately food for animals as well.