After a few hours play, I find the best method is to carefully observe your initial dwarves - allow them free reign if your surrounding zone is safe, or target nearby caves with caution.
Do not speed up time yet - you need to watch every cave breach, and be ready to hit 'Space' to engage time-warp, pausing time while you place walls. Do NOT place walls immediately surrounding your Town Hall - this won't leave you enough room to place dynamite and blow a hole, and you'll be fairly doomed. You'll not be able to seal the cave, and your failure is only as far away as the moment a dwarf runs at that wall howling and begins to hack it down. ALWAYS leave space around your town hall for emergency holes, but if you're forced to build holes around the Hall itself you're going to lose a lot of dwarves, and ruin your score.
Initially, your goal should be to secure nearby caves to buy yourself reaction-time and breathing room; essentially, you want the peace of mind that there are no immediate death-traps awaiting your hapless bearded fools within a few feet of their front door. Once you've managed your diggers carefully to secure immediate threats, you can relax a little - but don't obsess over sealing any flood dangers you find in the first minute or two - you will NOT be able to afford a complete seal, and you might NEED that money to hire new warriors if your diggers find a Minion lair early.
Maintain a bank account of several hundred whenever possible, and use Solidify to -partially- seal the exposed sides of caves, reducing the risk of your diggers breaching it in the short term. Sealing the nearest wall is a far higher priority than sealing the opposite wall, so consider the order in which you solidify blocks.
After the initial expansion, let your diggers work. You cannot micromanage them all, and your attention is best softly focused across the entire dungeon, than attempting to closely monitor and command every individual. They will inevitably open a large, undefendable cavern around your Town Hall, so in my opinion you shouldn't even bother trying to control them at this point. Walls only encourage their destructive tendencies, holes kill them, and solidify is painfully expensive until much later on. Just let them work, and monitor cave breaches carefully.
Ultimately; the deep dark is a dangerous and unpredictable place. Respect it and it still won't respect you, so instead relax, and accept the way the dice rolls.
Sometimes you strike gold; sometimes you feel a warm waft of air and are burnt to cinders in a wave of the glowy orange stuff. That's dwarven life for you =)