How does solubility affect temperature?
Solubility does not affect temperature. Rather, temperature affects solubility.
When a solute is added to a solvent, the kinetic energy of the solvent molecules generally overcomes the attractive forces among solute particles. The solute particles leave the surface of the solid and move into the liquid phase.
If we heat the solvent, the average kinetic energies of its molecules increases. Hence, the solvent is able to dislodge more particles from the surface of the solute. Thus, increasing the temperature generally increases the solubilities of substances. For example, sugar and salt are more soluble in water at higher temperatures.
However, as the temperature increases, the solubility of a gas in a liquid decreases. This happens because, as temperature increases, the average kinetic energy of the gas molecules increases. As a result, the gas molecules dissolved in the liquid are more likely to escape to the gas phase.