The absorbed energy makes the molecules in air move and expand, therefore decreasing the airs density. The opposite is true for cold air. It is more dense because the molecules are closer together and they are closer together because the bonds are absorbing less energy and therefore do not move as much.
Subsequently, one may also ask, why does heat rise up?
When we heat air, the molecules jiggle and zip around faster, which causes them to spread out. When a mass of air takes up more space, it has a lower density. Warm air rises when it's surrounded by cold air because of its lower density.
Why does warm air rises and cold air sinks?
When something is hot, its molecules are farther apart than when it is cold. When air is hot, its molecules are further apart, so it takes up more room. That makes hot air lighter than cold air, because the cold air has more molecules in the same amount of room.
Why does warm air rise up over cold air?
The cold air mass is moving to replace the warmer air mass and at the boundary a cold front forms. This happens because the warm air is lighter (less dense) than the cold air. You often see clouds forming at a cold front. This is because as the warm air rises, it cools and moisture in the air condenses.