I love to spice up campaign settings (dungeons in particular) with logic, mechanic or word-based puzzles. Can you propose valid resources for this ?
I've successfully used the format found in "Logic Puzzle" magazines.
These are those puzzles that you solve on a grid of possibilities.
Usually they are things like work out which pet belongs to which person based on a list of statements.
These can be easily adapted to a fantasy or other setting and given a reason for needing to be worked out.
There's been a murder at the masked ball. There are three suspects: Alice the Bard Father Cuthbert the Cleric Lunk the Stupid They wore each a different mask: Cat Mask Dragon Mask Orc Mask They each favoured a particular drink from the bar: Druid-tended Buckleberry Juice Landlords Finest Mead Elderberry wine
Now given some clues the players have to work out who wore which mask and favoured which drink. If you introduce the fact that we know which mask killed the mayor, then there's a reason to work things out to deduce who was wearing that mask.
The barkeep when questioned let's the players know that the person in the cat mask ordered the juice. The players know that the Cleric is tee-total. The murderer wore the Orc mask.
Given those clues we know it wasn't the Cleric that did the deed. A couple of more clues will lead us to the actual murderers identity.
It's easy to adapt the puzzles you can find online and just change the wording of the people/items and clues.
Also you could have more clues backed up to give the players, and give different amounts of experience based on the number of clues they needed to solve the puzzle.
You could integrate this into skill challenges by having skill checks to reveal the clues.
Kobold Quarterly has been doing a great series called "Encounter Codex" that presents some great puzzles that feel well integrated into the situation rather than just imposed artificially. Here's the most recent: http://www.koboldquarterly.com/k/front-page6486.php
The Eberron D&D adventure module "Seekers of the Ashen Crown" also had some nice puzzle-type traps. I only mention it because I recently read it and was impressed.
http://www.cloudkingdom.com/ is a resource specifically for this. Their source books work for any RPG. Plus they have a riddle of the week on their site.
Back in the old times when I did some dungeon crawling scenarios I put my players through some contraptions inspired by "the incredible machines".
I designed some door and traps that were possible to open, but one had to find out how. They were based on simple mechanisc, but it's hard to solve when you see only some parts of the construction. Especially when you see only throuhg your GM's voice :)
I hate to give this kind of answer, but I will anyway: don't do this. Or, to be less of a jerk: don't do this unless you're sure your players like it, too. The problem with riddles and puzzles is that they yank players out of their characters and into riddle solving mode. As someone said, puzzles are for players and not characters to solve. This makes them especially effective at making the player disregard his character. If you're trying to run a game in which character role-play is important, puzzles can create a big risk of derailing things.
Some puzzles can be great, and the more integrated they are with the game world, the better. If you go looking for puzzle sources online, bear in mind that it may take a lot of effort to convert them to something that really fits in the game world and that the characters, rather than the players will have to solve.
After all that, I have no really good resources to suggest. Sorry.
You might also try issues 2 & 3 of Raggi's Green Devil Face, which is specifically focused on that sort of thing.
My Turkish folklore teacher was always talking about the book "Bilmece: A Corpus of Turkish Riddles". I'm not recommending this book per se, but I'd like to point out that other cultures have a riddle-ing tradition, so searching the academic folklore world might yield some interesting results.
The logician Raymond Smullyan has a number of well-regarded puzzle books, each containing hundreds of logic puzzles varying in difficulty and theme. He also includes many anecdotes on paradoxes, logical dilemmas, and lexical gags that could make great inspiration for NPC dialogue:
Which is better, eternal happiness or a ham sandwich? It would appear that eternal happiness is better, but this is really not so! After all, nothing is better than eternal happiness, and a ham sandwich is certainly better than nothing. Therefore a ham sandwich is better than eternal happiness.
It occurs to me that a lot of groups play Cthulhu games this way: GM presents clues, players try to solve, the occasional skill-roll helps or hinders. I suppose my take on it is that puzzles work best in games where the player-characters are 'problem solvers' of some kind. Otherwise I tend to avoid them for the reasons of being too OOC as already mentioned