What causes sea and land breezes?
Pressure gradient caused by uneven heating rate.
All wind is caused by a pressure gradient. In the case of land or sea breeze the pressure gradient is due to the different heating and cooling rates of the area.
Lake or sea breeze and land breeze are on a comparatively small scale when viewing meteorological events. This is important to note because large scale heating and small scale heating work differently. In the case of small scale heating, the increase in heat causes an increase in volume which in turn lowers the pressure in that area.
How it all works. In the morning the land heats up much faster than the water. This eventually results in a pressure gradient with a lower pressure on the land due to the quicker heating. Air moves from the water to the land in the form of a sea breeze.
After sunset, the land cools much quicker than the water. As a result the volume of the air over the water is higher and the pressure decreases. Ar then moves over the water as a land breeze.