Atmosphere is mostly warmed by the Earth’s surface

The atmosphere is mostly warmed by the Earth’s surface rather than that directly by the sun.” is this a valid statement? why orwhy not?