I'm hearing conflicting reports now because the wiki said that opening up multiple z levels of tiles will make them aboveground, as in having 3 empty spaces on top of each other over one square along a hallway and such.
Part of the confusion is that there are currently three states: "Outside Light Above Ground", "Inside Light Above Ground", and "Inside Dark Subterranean".
Changing Dark Subterranean to Light Above Ground is a *permanent* change; rays of light fall vertically in each square from the top of the sky, changing every square they pass through until they hit something. Once changed, you can't change it back; you can build a ceiling of glass, or of cheese, or obsidian cast an entire mountain above it; doesn't matter, any square changed to Light Above Ground will remain that way forever. Some people, for their own roleplaying reasons, will channel out the layer(s) of roof over their garden, and then build a glass roof to seal it back off from attacking flyers and weather, while retaining the ability to grow above-ground plants; but mechanically the fact that the roof is glass is irrelevant; you'd get the same effect if the roof was microcline to give a nice artificial sky blue color, or of unicorn soap for the imaginary sparkling, or whatever.
Outside is determined in generally the same way, but is reversible; if you block the rays of Outside-ness falling from the top of the sky, you can become Inside again (or even if it never was originally).
Outside Light Above Ground *removes* cave adaptation points; Inside Dark Subterranean *adds* cave adaptation points; Inside Light Above Ground does neither. So, if you have dwarves who spend a little time outside already, but tend to be be too cave adapted on average, you can change the accumulation in several ways. Spending more time in OLAG is only one; you could also reduce the time they spend gaining points from IDS by channeling and then re-roofing the upper parts of your fort, converting more of their time into neutral ILAG.
If the rays of Light Above Ground falling from the sky top can reach a square, it doesn't matter how far underground it originally was, as a note. It's always high noon at the equator on the equinox in DF as far as light is concerned, falling straight down vertically any distance until stopped. Note this means that unlike the real world, windows have no effect on whether something is lit or not.
Conversely, it doesn't matter how much open space is above a square if it isn't open to the sky at the top.