Sun emits mainly UV / visible radiation which is absorbed by Earths surface and re-emitted as IR radiation. Molecules of greenhouse gases, like carbon dioxide, methane and water vapour, have bonds that are really good at absorbing IR energy - so if amounts of these gases in atmosphere increase, more IR radiation is another which leads to global warming. More IR radiation a Molecule absorbs, more effective the are as greenhouse gases