This explains why sugar is more soluble in hot water than in cold. The same sort of analysis can be applied to solutions of gases. A molecular model of gas solubility. The solubility of gases, like other solubilities, can increase or decrease with temperature. A simple model can be used to explain why gases can behave either way, depending on the gas and the solvent.
Solvent molecules attract each other.
Pulling them apart to make a cavity will require energy, and heat is absorbed in this step for most solvents. For water, very little heat is required to create pockets that can hold gas molecules. Energy is released when a gas molecule is popped into the pocket . Intermolecular attractions between the gas molecule and the surrounding solvent molecules lower its energy, and heat is released. The stronger the attractions are, the more heat is released.