Thunderstorm development requires three ingredients, moisture, unstable air and a mechanism for lifting. Primary sources of moisture are large bodies of water. In North America these sources are the Atlantic and Pacific oceans and the Gulf of Mexico. Large lakes such as the Great Lakes are also a source of moisture for storms called Lake-Effect thunderstorms. The warmer the surface temperature of the water the greater the evaporation rates lending more moisture to the air. Warmer air holds more moisture than colder air, this is termed relative humidity, the amount of water in the air is relative to the air temperature.
Atmospheric air density is how much it weighs by volume and is dependent on temperature, pressure, and moisture content. Hot air is less dense than cold air, this is what causes hot air balloons to rise. Moist air is less dense than dry air at the same temperature. Air pressure is greater at the surface than at higher altitudes.
Atmospheric stability refers to the property of ambient air to suppress vertical motion or enhance vertical motion based on vertical temperature profile and relative humidity. When air rises it expands, decreasing in pressure and temperature and increasing in relative humidity, these effects lowers its density. When this change in density fails to maintain its ability to rise then it is stable, when the rising air remains less dense than surrounding air it will continue to rise and is unstable. The math on air density here.
The mechanism for lifting unstable air at the surface can be from sunshine warming the surface unevenly and the air in contact with it. Paved surfaces heat faster than grass and open water heats slower. The sunshine and warmer air temperatures can also increase evaporation, raising the moisture content further destabilizing the air. As the surface air becomes warmer and wetter it becomes less dense and more unstable and will rise. When all these conditions are ripe and the rising air contains enough moisture clouds will form, if the air is still unstable and continues to rise rain and thunderstorms will form. The hotter and wetter the unstable air the faster and further it will rise causing more violent storms.
There are other methods of destabilizing an air mass. Colder drier and more dense air moving into a warmer more humid less dense area will lift the warm humid air also causing rain or thunderstorms. This is called a cold front. If the warm humid air moves into a cooler area it tends to rise over the cooler air and is called a warm front. Hot dry air moving into warm humid areas is called a dry line and can trigger thunderstorms.