My book says that the ability of a gas to absorb infrared radiation affects its potency as a greenhouse gas, but I don't understand why. So what if a gas is able to absorb a lot of IR? How does that affect its potential as a greenhouse gas?
There is only one difference between a greenhouse gas and a non-greenhouse gas: a greenhouse gas has a greater ability to absorb radiation in the infrared (IR) region of the electromagnetic spectrum than does a non-greenhouse gas.
Once a greenhouse gas absorbs IR radiation, that energy must be converted to another type of energy such that the the energy is conserved. The only thing that can happen at IR energy levels is that the absorbed IR energy gets transformed into thermal energy, resulting in an increase in heat in the atmosphere.
From there it follows that the more strongly a particular gas absorbs IR radiation, the more heat is retained in the atmosphere, which might have otherwise just radiated off into space as IR radiation. This means a gas absorbing strongly in the IR is a more "potent" greenhouse gas than one that only absorbs weakly or not at all in the IR.