was going to post something similar,
In my opinion the system should take two things into account: circumstances around the death, and the type of burial. Circumstances being what EvilMoogle mentioned and burial falling into three different categories:
left on the field / throw in trash (bad)
buried in graveyard (neutral)
laid to rest in a coffin (good)
Yes, there are at least two ways to look at dead returning to life. The first is what has been discussed most in this thread - zombiefication, where some contagion, or magic, enters a body and animates it. Vampirism is possible to be regarded in this way too.
But there is the other category, where it is the deceased himself that decides to return for whatever reason. I wouldn't limit this to the state of mind at the time of death, but allow factors after death to affect it.
On this view, religious rituals are not primarily counters to the evil and magic of the biome, but rather the necessary degree of respect paid so that the dwarf himself will be at peace and move on rather than get up to mischief. The deity doesn't have to either exist or have any power over undeath, but only be the one the dead person wants.
It's not just burial versus non-burial; some dwarfs (nobles) may expect lavish coffins and tombs and rest uneasy if they're disappointed (I can hear noble-slayer players howling at the thought! Mandates after death?!). Of course, the deceased's
capacity of returning from death might be modified by the biome - but the ritual works on his
inclination.
Now, it's typically incorporeal undead that are associated with "voluntary" return from death - ghosts, spectres, wraiths - but we also have revenants, ghouls and ghasts. And angry mummies, of course.
My opinion then: burial helps against zombies because it keeps them from getting out physically - and it keeps any wandering animating spirits from getting at the corpse so easily. Burial - with ritual - helps against revenants, ghosts and the like because they placate the deceased.
Specific deities might have powers in addition to this, subject to whatever the magic arc comes up with.