Final answer:
The chloroplast produces glucose for the cell through the process of photosynthesis, using sunlight as an energy source.
Step-by-step explanation:
The function of the chloroplast is to make glucose (or sugar) for the cell. During a process called photosynthesis, chloroplasts use energy from sunlight to convert carbon dioxide and water into glucose, which is a source of energy for the cell. Oxygen is a byproduct of this process, so while chloroplasts do produce oxygen, their main function is the production of glucose.
Learn more about Function of chloroplast