Why air is transparent
Because air contains so few atoms, light waves run into very few of them when they shine through air. So the air looks transparent. If you put enough dust in the air, the particles of dust absorb the light and the air stops being transparent.
Or if you make the air incredibly thick, the air absorbs a lot more light. For example, air at sea level is much thicker than air, say, at the top of Mt. Everest. The higher you get, the thinner the air gets. Thin air is much clearer than thick air, because there are less atoms and dust to block the light. When you look straight up at noon, you're looking through a couple of miles of thick air, then about 60 miles of thinner and thinner air, then the vacuum of space. When you look toward the horizon at sunset, you are looking through many miles of thick air at the surface of the Earth, which blocks much of the sun's light. That's why you can't look at the sun at high noon, but you can watch a sunset.