Dear Student
Sunlight and chlorophyll both are very important for photosynthesis.
Photosynthesis occurs when green plants absorb sunlight and use it to convert carbon-dioxide and water into carbohydrates and oxygen in presence of chlorophyll.
Chlorophyll is a green color plant pigment responsible for absorption of energy from sunlight, it gets excited in presence of sunlight. Chlorophyll traps sunlight of certain wavelength which is then used to excite the electrons.
Regards