The function of a leaf on a plant is to store a range of cells that are critical to conducting photosynthesis. Leaves have different layers with different cells, but many of these cells contain structures called chloroplasts, which contain the pigment chlorophyll. Chlorophyll is a pigment that absorbs light from the sun, and most of the chlorophyll in a plant is located in leaves.
Plants depend on photosynthesis to create useful energy for their cells. One important ingredient of photosynthesis is sunlight, which cannot be absorbed through most of the plant's cells. However, the green parts of the plant, such as leaves, typically contain the chloroplasts for photosynthesis to take place in.