Odd that you don't think the atmosphere can absorb heat from the Sun yet you think it can be warmed by the Earth? Is it really that hard to understand that as Sunlight filters down from the Sun that it strikes dust particles and other particulates which are heated by the Sun and water droplets which are both heated by the Sun as well as acting like tiny spherical lenses to refract sunlight? Any wavelength which is transparent to a material like water passes through mostly, merely being changing in direction by an alteration of its speed of propagation through the medium as a function of its refractive index while the remaining energy acts to heat the substance. Of course, water droplets are not pure, full of contaminants and solids from the Earth, but as the wavelength becomes increasingly less transparent to the material it becomes increasingly more converted into infrared energy. The Sun puts out far more than just visible light.
Simply put: The earth's atmosphere is largely transparent to sunlight. That's why we don't live in permanent darkness on the surface, and we can catch a sunburn, too. The atmosphere is, however, largely opaque to the infrared radiation the earth's surface is emitting.
Greenhouse effect
Greenhouse gases effectively absorb thermal infrared radiation, emitted by the Earth’s surface, by the atmosphere itself due to the same gases, and by clouds. Atmospheric radiation is emitted to all sides, including downward to the Earth’s surface. Thus, greenhouse gases trap heat within the surface-troposphere system. This is called the greenhouse effect. Thermal infrared radiation in the troposphere is strongly coupled to the temperature of the atmosphere at the altitude at which it is emitted. In the troposphere, the temperature generally decreases with height. Effectively, infrared radiation emitted to space originates from an altitude with a temperature of, on average, –19°C, in balance with the net incoming solar radiation, whereas the Earth’s surface is kept at a much higher temperature of, on average, +14°C. An increase in the concentration of greenhouse gases leads to an increased infrared opacity of the atmosphere, and therefore to an effective radiation into space from a higher altitude at a lower temperature. This causes a radiative forcing that leads to an enhancement of the greenhouse effect, the so-called enhanced greenhouse effect.
Definition courtesy of IPCC AR4.
All IPCC definitions taken from Climate Change 2007: The Physical Science Basis. Working Group I Contribution to the Fourth Assessment Report of the Intergovernmental Panel on Climate Change, Annex I, Glossary, pp. 941-954. Cambridge University Press.