Why is sunlight needed in making food of plants?

Sunlight is needed in making food for plants because in the process of Photosynthesis a major part involves sunlight. Further, without the sun most plants would not be able to survive