It has to do with micro-organisms like phytoplankton that literally use light to create sugars to build their bodies, much like plants use chlorophyll to create sugars.
No light, no life for these creatures.
Also on the argument of ocean temps, the scientific arguments have to do with the atmosphere insulating the overall heat of the earth, this causing the ocean temps to rise. It has nothing to do with direct sunlight heating the water.