When light travels in a medium, it scatters from individual atoms. When the arrangement of the atoms is uniform and regular (solids, glass), the light scattering from different atoms CANCELS. (no scattering)
In a gas, because its density fluctuates, the scattering is strong. Here are some of the empirical observations:
Some wavelengths scatter more than others.
Some polarizations scatter more than others