What is the least dense layer of the sun?

That would be the corona--the outermost layer, and, to use a terrestrial (and not really equivalent) term, its atmosphere. The corona is the bright halo of light visible only during a total eclipse. Its density at its base (closest the Sun's surface) is only about 400 million atoms per cubic centimetre. This may seem a large number, but the earth's atmosphere is about 10 trillion times denser at sea level. Moreover, the corona's density drops exponentially: by a factor of e (2.71828) for every 50,000 kilometres farther out from the surface you go.