First off dungeon walls should be just dirt, easy to dig through and sort of cave-like in appearance.
Then, Imps would automatically build basic stone walls (maybe with torches as you suggest), in the order in which the gallery was dug. For example, if you start by digging your dungeon and then branch out galleries to reach minerals, the Imps would first build walls around your dungeon chambers, before going out and building walls in the mining galleries. Building walls should be a low priority for Imps: they should place higher importance on gathering resources, moving corpses around, etc. This should create an incentive to have a good number of Imps, otherwise they might never get to wall building.
Once basic stone walls are built, you could upgrade them to reinforced walls. These reinforced walls would be placed manually and cost extra stone or iron, or both, and be really tough to tunnel through. Tunneling enemies would try to avoid having to tear those down and would seek to breach your dungeon through the weaker walls.
On a related topic, there should be some kind of warning when tunneling enemies are approaching your dungeon. When they're in the vicinity you could hear a sound, and when they're closer, say trying to tear down a wall, then the tile from where the enemy is attacking would be revealed, giving you a few seconds to scramble a defense party.