Infrared radiation is absorbed by molecules on the Earth.
However, the Earth is heated by visible radiation coming from the Sun where oscillatory motion of molecules is extreme. This visible radiation passes through the atmosphere to reach the surface of the Earth. This incoming visible radiation from the Sun is then converted to infrared radiation which is then reflected back toward space. A portion of the outgoing long-wave radiation encounters gases in the atmosphere which have chemical properties that prevent this energy from escaping. We say that the atmosphere is very good at adsorbing infrared radiation which heat is then stored in the atmosphere.