They use the process of photosynthesis for energy and only in the upper 100 ft the sun can produce light into the bodies of water and the phytoplankton then use that light and use the process and convert it for their energy
A greenhouse works in a convection way, since sunlight is energy that flows through the greenhouse windows, it then hits a solid surface and turns into heat. Think of it like an convectional oven, the light of the 1100 watt light bulbs used in an electronic oven hits and bounces off the oven walls(which are a solid surface) and turns into heat in order to cook your food.