Bodies of water heat up and cool down at a slower pace than land because they need more energy from the sun to gain a higher temperature. They are typically colder later into the season and warmer than nearby land masses as the cold season draws near.
Sea breeze is the wind blowing from the ocean toward the land. It typically occurs during spring and summer due to the higher differences in temperature between the water and nearby land masses. The sun warms up the surface of the ocean and the land at daytime. Both water bodies and land masses absorb plenty of energy emitted by the sun.
However, water warms up more slowly than land, causing the air over the land to become warmer than the air above the ocean. Low pressure builds up on the land surface as the warm air rises all day. High pressure develops on the surface of the water due to cooler air. To balance out the effect of the pressure buildup, the air starts to descend to the ocean. As the high pressure increases, the wind blows over the water to decrease the pressure on the land. This results in the occurrence of the sea breeze. The temperature difference between the water and the land affects the strength of the sea breeze.