Chloroplasts are the organelle, inside the plant cells, responsible for photosynthesis- a process by which light energy is converted to ATPs and oxygen is formed (along with the consumption of carbon dioxide). To carry out this process, chlorophyll pigment is needed. The chlorophyll is contained within membrane bound compartments called thylakoids. These sack-like structures are the sites of photosynthesis. In thylakoids, light energy is used to split the water molecules, which generates oxygen and protons. These protons are needed to create a proton gradient across the cell membrane, which will ultimately result in generation of energy in the form of ATP (Adenosine triphosphate) molecules. A large number of thylakoids are needed to carry out the photosynthesis process at large scale and hence a large number of thylakoids are present in chloroplast.
Hope this helps.