Locked chests in the dungeon: where to find the keys and what to expect inside?

Solution 1:

  • Hallowed Chest
    • Requires Hallowed Key to open
    • Always contains the Rainbow Gun
  • Jungle Chest
    • Requires Jungle Key to open
    • Contains the Piranha Gun
  • Frozen Chest
    • Requires Frozen Key to open
    • Always contains the Staff of the Frost Hydra
  • Crimson Chest
    • Requires Crimson Key to open
    • Always contains the Vampire Knives
  • Corruption Chest
    • Requires Corruption Key to open
    • Contains the Scourge of the Corruptor
  • Golden Chest
    • Requires Golden Key to open (See below how to acquire)
    • Contains either Magic Missile, Muramasa, Cobalt Shield, Aqua Scepter, Blue Moon, Handgun, Shadow Key or a new Golden Key

All of the rewards, except for those from Golden Chests, are unique to the dungeon.

All of the dungeon keys are acquired by combining a random drop from the respective hardmode biome with a Temple Key and 5 souls of Sight (Twins), Might (Destroyer) and Fright (Skeletron Prime).

In addition to these main rewards, all chests also contain some other items such as potions, explosives, materials, coins and lighting equipment.

Acquiring a Golden Key:

Finding one in an unlocked, normal Chest in the Dungeon
Finding one in an unlocked, Living Wood Chest inside a Living Tree.
Killing a Dungeon Slime
Killing another Dungeon monster (1/67 chance)
Breaking a pot in the Dungeon (1/40 chance)

Sources:
My own dungeon delving
Terraria Wiki
Source code of the game