The air is transparent because those are the wavelengths we (as air creatures) evolved to see. If it wasn't, we would have evolved sight in wavelengths (or media) that was transparent: ie: sonar, x-rays.
Other wavelengths may have issues with detection or the information provided; if something can cut through obstructions in the atmosphere it may be hard to grow cells which interact with it or the rays may also ignore whatever is present locally at most scales.
The eye might be reduced in detail to the same domain as hearing or smell.
I suspect it is not possible to evolve to detect X-Rays given the basic building blocks life has to work with, but yes your general idea is right. Vision has evolved independently at least half a dozen times because of this selection pressure.