Visible light is either reflected away from Earth, or else it is absorbed on the surface and then re-emitted as infrared light (perceived as heat). This is in addition to the infrared light that the sun sends our way. Thus, the overall energy input to our biosphere is greater than what some overly simplified drawings explaining the Greenhouse Effect are able to convey.
When higher energy short-waved photons of visible light are absorbed and re-emitted as lower energy infrared light, it is a function of quantum physics (based upon how photons interact with atoms’ electrons).
http://blair.pha.jhu.edu/spectroscopy/basics.html
https://www.learner.org/courses/envsci/unit/text.php?unit=2&secNum=3 yuh