Minecraft wiki entry for Defeating_a_dungeon, associated text: If it's a zombie dungeon, take care to note what difficulty you are on. If you are on hard difficulty, additional zombies can spawn as you're dealing with the zombies in the spawner, attacking you from behind. Smite will be the most effective sword enchantment here, as well as a shield and good armor.
If it's a spider dungeon, know that spiders can climb walls and are 1 block tall but can't fit in a one wide gap. Spiders are affected by Bane of Arthropods.
Skeleton dungeons might be the best type of dungeon, but is also the most dangerous type to defeat. Projectile Protection armor will be helpful, and a shield is absolutely essential. Note that skeletons are the same size as zombies but can still shoot through gaps. Like zombies, they are affected by Smite.