What is the function of the thylakoid membrane?

It takes in light energy to make food for plants.