Remember photosynthesis: How plants capture energy from the sun. Chloroplasts (the green parts of leaves) are where the sun’s energy is captured.
For more info:
Andrew, Elise. “These Cute Sea Slugs Are The Sheep Of The Sea.” IFLScience, IFLScience, 15 Aug. 2016, www.iflscience.com/plants-and-animals/these-cute-sea-slugs-are-sheep-sea/.
Händeler, Katharina, et al. “Functional chloroplasts in metazoan cells – a unique evolutionary strategy in animal life.” Frontiers in Zoology, vol. 6, no. 1, 2009, p. 28., doi:10.1186/1742-9994-6-28.