During the day, as the sun heats the Earth’s surface, the lower layers of the atmosphere become unstable and rises. The parcel of air would continue to rise as long as it is warmer than the air surrounding it.
Convection might also be occur after an air mass moves over a surface warmer than itself. For example as an arctic air mass moves over the Pacific Ocean. This type of instability is not dependant on daytime heating and can continue day or night.