Polar compounds are more soluble in polar solutions because interactions between solvent and solute are similar to interactions between solvent and solvent. When solvent-solvent interactions are strong, solvent-solute interactions must be strong for appreciable solubility.
Nonpolar substances dissolve in nonpolar solvents. Interactions are all small in this case but the entropy drives the solution process. Solubility of solids usually increases with temperature, but the solubility of gases decreases with increasing temperature. As the kinetic energy increases, entropy becomes the more important factor. Gases dissolved in liquid are a lower entropy state than free gases and free liquid. Solids dissolved in liquid are a higher entropy state than the separate solids and separate liquid. There are a few exceptions where enthalpy change with temperature is much larger than the entropy factor, but it is a good general rule in the absence of data.