Answer: This is because water has a higher Specific Heat Capacity than air.
Step-by-step explanation:
The specific heat capacity of an object measures how much heat will be required to change its temperature.
Water has a higher specific heat capacity than air, so the temperature of the water will remain fairly constant even though the air surrounding the water is experience temperature changes.
Since air has a lower Specific Heat Capacity than water, heat from the sun will readily heat it up in comparison to water.