Convection is a process by which warm air which has faster moving molecules and is less dense rises while the cooler air drops down. It plays an important role in the formation of land and sea breeze. During the day, the sun warms up the air above land as well as sea. Since land heats up more quickly as compared to water,the air above land heats up faster than that above sea. Consequently, the warmer air being less dense moves up. This place is filled by the cooler air above the water (or the sea) creating sea breeze.
On the other hand, lands cools down more faster than water during the night and creates land breeze.