Water takes a bit more time to warm up and is able to retain the heat longer than land does. In the day, when the sun is up, the land heats up very quickly and the air above it warms up a lot more than the air over the water. The warm air over the land is less dense and begins to rise. Low pressure is created. The air pressure over the water is higher with cold dense air, which moves to occupy the space created over the land. The cool air that comes along is called a sea breeze.
In the night, the reverse happens. The land quickly loses its heat whiles the water retains its warmth. This means the air over the water is warmer, less dense and begins to rise. Low pressure is created over the water. Cold and dense air over the land begins to move to the water surface to replace the warmer rising air. The cool breeze from the land is called a land breeze.