The sea has a greater heat capacity than land. This means that the land heats faster in comparison to water.
As a result of this heat capacity, the surface of the sea warms up more slowly than the surface of the land in coastal areas during the daytime.
Hence, the temperature of the air above the surface of the land rises and convection currents are set up.
The warm air expands due to lesser density, decreasing the pressure over the land near the coast.
In comparison to the air above the land, the air above the sea has a relatively higher pressure, causing air to flow from the high pressure towards the lower pressure resulting in a sea breeze.
Thus the differences in air pressure created by the differing heat capacities of water and dry land lead to the formation of a sea breeze.