There are two parts to photosynthesis:
The light reaction happens in the thylakoid membrane and converts light energy to chemical energy, this must take place in the light. Chlorophyll and other pigments are organized in clusters in the thylakoid membrane and are involved in the light reaction. These
differently-colored pigments can absorb different color of light and pass its energy to the central chlorophyll molecule to do photosynthesis.
You can find other information and more details in this site: