When ultraviolet and visible wavelength photons get sent from the sun they seem to not interact with CO₂ and other greenhouse gases. When that electromagnetic energy gets to the earth, the earth radiates energy back out in the form of infrared radiation which does interact with greenhouse gases causing those gas molecules to vibrate which causes some of this energy to be sent back to earth.
My question is why does smaller wavelength radiation not interact with CO₂ but larger wavelengths do?
I know that the smaller wavelengths would likely cause the electrons in the gas molecules to go to a more excited state and eventually release a photon instead of just vibrating the molecule but it seems like this doesn't even occur and the smaller wavelength radiation just passes through the greenhouse gases like they aren't even there.