The Green houses gases are CO2, chlorofluoro carbons, CFC, Methane CH4, sulfur related gases, even water vapour in air etc.
They absorb light energy (photons) of longer wavelength and shorter frequency than light. Because the energy gaps for the outer most orbit electrons in the shells correspond to these frequencies of photons. So these gases transmit the visible light and ultraviolet rays.
Infrared radiation starts from 800 nm to 100 micro meters. But green house gases may not absorb the radiations in the entire infrared spectrum.
For ozone, the energy bands correspond to ultraviolet rays frequencies. So they absorb them.