Why is the atmosphere transparent in the visible spectrum? One of the great 'coincidences' in physics is that the Sun happens to shine most brightly at exactly the wavelengths our eyes can see; it's an easy explanation that our eyes evolved to make the most out of what was available.
However, this spectral window is also one of the few at which our atmosphere is transparent, with Rayleigh scattering and the ozone layer protecting us from the UV and strong water vapour absorption in the IR until way into the radio range.
My question is: is this a coincidence? Were there geological factors that made it so? Or is it just lucky chance? (I also notice other planets in our neighbourhood weren't quite so lucky.) Or had atmospheric absorption been different our eyes would have tuned to whatever spectral window were brighter as a whole?
 A: Gases can only scatter light strongly if it matches a quantum transition (Rayleigh scattering doesn't involve quantum transitions but it's relatively weak). Quantum transitions can be rotational, vibrational or electronic (strictly speaking rotational and vibrational transitions are usually combined). Rotational/vibrational transitions have an energy that is generally in the IR range (which is why CO$_2$ scatters IR light) and electronic transitions have energies in the UV range (which is why ozone scatters UV). So there's a gap in the visible range. You say:

I also notice other planets in our neighbourhood weren't quite so lucky

but assuming you're talking about Venus, Jupiter, Titan etc, the scattering is from particles not from gases. After all, Earth's atmosphere isn't particularly transparent on a cloudy day.
It is a co-incidence that the Sun's light peaks in the visible region. Planets have been found around all sorts of stars, and if the star is cooler or hotter than the Sun it's spectrum will peak at a different wavelength. However it may not be a co-incidence that we evolved on a planet whose starlight does peak in the visible wavelengths. After all, if it didn't, life on Earth would probably be different and we probably would be here.
A: Looking at this rather popular (because of the climate debate) plot:

And, taking into account that the horizontal scale is logarithmic. I'd say that it is not that big of a coincidence. 
