Molecules absorb radiation if they have something that can change if that amount energy is applied to it.
In a gas molecule there are two things than can absorb energy.
The electrons in the atoms can absorb energy and be raised to a higher level, and emit energy when the fall from that level back to a lower one. The correct energy to do this is the same as visible light, so atoms absorb and emitvisible light. This is where the light from LED, lasers, flourescent bulbs etc comes from.
The bond between the molecules can also absrob light, but it takes much less energy to shake this bond, because the bon d between atoms is much weaker. This energy corresponds to infrared light and is why molecules are important in the greenhouse effect.