I am not a fan of puzzles in dungeons.
The primary reason for this is that there is precious little in-game reason for a puzzle to exist in a dungeon (or any other site-based adventure). The reason for this lies in the correct use of security protocols: a dungeon is a place where you put things that you want to keep away from just anyone, but you have to either want to allow access to the ‘right kind of people’ or just be flat-out incapable of destroying whatever you’ve locked away down there.
Aside I: With a little modification this theory holds for any adventure site. Take the fortress of an evil archmage, for example: the item which he wants to keep safe is his own person; he can’t destroy the item, for obvious reasons; and he wants to make sure that the right kind of people – those bearing gifts, or with legitimate reason to visit him – can get through.
So, with this in mind, every security protocol you put in place has to act as a screen – allowing the right kinds of people through but keeping others out. It’s the same reason that sensitive data on computers is kept encrypted and password-locked* – it has to be accessible to the right people, but no one else.
Aside II: Not every encounter is a security protocol. The evil archmage’s pet hydra has a perfectly good reason to be loafing around in the dungeon – and that reason is tasty halfling-based comestibles – but he’s not intended to screen anybody. He just happens to be there.
A guard post functions to let people through who are recognised by the guards and/or who know the password, but stop everyone else. A trap functions to let people through who know how to avoid it, but stop everyone else. A lock lets people through who have the key. A puzzle lets people through who know the answer… and anyone who’s smart enough to figure out the answer. It’s a lot like replacing the password on your email account with an integral equation that must be solved to proceed: you know the answer, but so does anyone else with the right knowledge and time to calculate. Would you trust the contents of your inbox to anyone with an A-level in maths?
Unless you’re specifically filtering your dungeon so that only smart people can pass a certain point – and I can think of a couple of dungeon concepts where that might work – there’s no reason for a puzzle to exist there.
I’m also not a huge fan of puzzles outside of dungeons, for different reasons. Typically they either exist to challenge the characters – in which case a single die roll normally takes care of that – or they exist to challenge the players, which have a whole host of problems of their own: any puzzle easily avoided will be avoided, and any compulsory puzzle will either be trivially easy (therefore pointless) or completely impossible (therefore derailing the entire game).
I think that puzzles can be done well – a murder mystery, for example, where the characters must interview suspects and reach their own conclusions about what happened – but that such things are a rarity.
*Unless you work at Sony. Fuck you, Sony.