Why solubility decreases with increasing temperature for gaseous solutes but increase for solid solutes?
Gases are gases because their molecules are relatively far apart from one another and they are moving at high speeds in a random motion. There is very little attraction between the individual particles. If you could look at the interface between air and water you would see some air molecules (gases) striking the surface of the water while others at the same time are exiting from the surface of the water. Water has a relatively high surface tension because of the hydrogen bonding between the water molecules so the air molecules (gases) have to strike the surface with enough energy to penetrate the surface layer and go into the bulk water.
Once a gas molecule enters the water the only thing holding it there are weak intermolecular forces between the gas molecule and the water molecules and the surface tension of the water molecules at the surface.
As the water heats up the water molecules heat up - causing the hydrogen bonds to break and reform more rapidly - and the gas molecules also heat up - gaining kinetic energy. The increased kinetic energy results in the gas molecules moving more rapidly, allowing them to escape from the liquid more easily.
For most solids, as the water warms it expands - increasing in volume - producing a larger space between the water molecules for the solid solutes.