As hoi says, a lot of time can be wasted easily trying to find the answers. But I give you a short reply to your questions.
There are some ‘windows’ in the atmosphere so, depending on the frequency, the radiation emitted from Earth is reflected, propagated or escaped to outer space. The same goes for radiation coming from outer space. Then, the explanation goes like this:
– radio waves up to 30 MHz reflect in the atmosphere;
– radio waves with a frequency higher than 3 GHz escape through the atmosphere;
– in the middle, radio waves are propagated through the atmosphere;
– infrared radiation is mostly absorbed by the atmosphere;
– then visible light and some UV radiation pass through the atmosphere;
– the rest of the spectrum (X-rays, gamma rays) is blocked by the atmosphere.
That’s all. You can search all the details and graphics that you want. And this explains radio astronomy, satellites communications, GPS, etc.