Most science fiction stories has humans building large domes on the surface of planets like Mars or the Moon. But wouldn't it make more logistical sense to dig down and build down into the planet? I could see needing some dome space for human psychology so everyone wouldn't become agoraphobic but wouldn't most living and work space be easier and safer to build by going down? Does that make sense or am I missing something? Why build a large 'fragile' dome?
Because the dome is impermeable; rock isn't.
Or more accurately, the ground is not impermeable. Cracks run this way and that, soil lets gases seep through it, and it all shifts and cracks anew frequently (see: earthquakes). Further, the rocks themselves could pose hazards for those living there, everything from dust getting into the electronics and wreaking havoc (not to mention getting into lungs and doing all kinds of harm) to toxic minerals leeching into your environment; some rocks -- especially on a planet devoid of oxygen -- could react to the oxygen introduced into the environment in all manner of bad ways.
Now, of course, you could line your underground city with an impermeable shell to avoid the issues of just using the rock itself directly. But now you're going through all the effort of digging out your settlement and then adding the effort of building your buildings -- made even more difficult now by having to maneuver your materials through the passageways you've dug! Plus expansion just got a lot harder, since you have to go outside this shell to dig new areas, then line it, then breach the old shell to combine the new area with the old; under a dome you simply build a new structure.
Building on the surface is just more advantageous in many ways:
- It's faster to build a structure than to dig a similar structure, especially if after digging one you have to build a liner/shell inside it.
- No need to worry about where/how to dump the material you dig out (a big deal if it's got to pass through an airlock somewhere).
- It's a heckuva lot easier to build than to dig.
- Digging runs all kinds of risks from cave-ins to underground gas pockets to even striking magma (albeit only on planets with magma, of course), and more.
- Human beings just aren't adapted for underground living.
Even a giant dome just makes more sense than going underground. The first arrivals would most likely erect a simple habitat for themselves, then go to work on the dome. This would be a lot faster than excavating a similar amount of space, and would allow for future construction within the dome without the added hassle of maintaining livable environments for your workers.
Now, all of this assumes an environment like Mars, where the only real risk is the atmosphere itself (or lack thereof). If you were on a planet where high levels of high-energy radiation bathe it constantly, going underground to escape it might make sense; similarly, an airless body constantly bombarded by small meteors would make sense to take shelter underground. Beyond circumstances like this that do encourage going underground, however, building on the surface just makes more sense.
NASA have considered this for the moon: http://www.theverge.com/2014/7/18/5915743/nasa-moons-underground-caves-could-house-astronauts
"A habitat placed in a pit — ideally several dozen meters back under an overhang — would provide a very safe location for astronauts: no radiation, no micrometeorites, possibly very little dust, and no wild day-night temperature swings"
This would give us astronauts who are also cavemen.
Digging in has many advantages, but is also very costly. Excavation takes a lot of energy and complicates construction compared to just building on the surface. Whether or not this is worth the energy investment depends on the particular conditions of where you are building.
Many suggestion for colonizing Mars include building in old lava tubes - this would remove the additional costs of excavation, which make the extra protections from radiation or weather quite attractive (not necessarily direct weather effects, but you wouldn't want wind erosion to undermine your habitat). If you can find suitable preexisting holes in the ground, which are reasonably well sealed, it would probably be the best place to build.
Just digging a hole may not be enough if the material you are digging into is highly permeable, is only loosely compacted (will shift around and needs significant structural support), or full of toxic materials. In those cases, you still need to provide structure and a sealed environment anyway, which is easier to do as buildings on the surface. Massive excavation machines are very expensive, small fabricators mass producing cement block equivalents are comparatively cheap.
In The case for Mars, Robert Zubrin proposes building with locally manufactured bricks and covering the 'building' with dirt. The moisture in the habitable air inside would seep through the cracks and freeze to ice, forming a barrier that would stop further air from escaping (or at least keep losses to manageable levels). No need for fancy linings in that case.
Building a dome costs much much less on large scales.
When you build a dome, your cost is proportional to the surface area of the dome. When you dig under ground, it is proportional to the volume exhumed. Since you are generally needing to create habitable volumes, this means domes effectively decrease in cost-per-area linearly, while digging must remain constant.
So I have a minor addition to all of the other valuable answers. While building a dome is cheaper, providing radiation shielding can apparently be difficult and expensive.
This may necessitate a mixed approach, such as building the habitat in a reasonably deep crater, (or more likely a shallow crater dug deeper, as it may be advantageous to have a smaller diameter to utilize more of the shielding provided by the solid surface of the planet). This is a bit like what @pjc50 posted that NASA is considering (though they mostly are suggesting creating habitats IN the caves connected to the pits...).
In addition in Colonizing The Galaxy in 8 Easy Steps, the author suggests utilizing water as a multipurpose radiation shielding material. He also suggests using it as a way to produce food and recycle water into a renewable source of water. Which I suspect could be an interesting possible addition to the dome solution.
Seems like everyone misses the obvious answer: food and air. You need sunlight to grow plants in order to eat & breathe. Unless of course you have nuclear fusion powered grow lights in your underground tunnels, in which case why bother to go all the way to Mars to dig them?