This is apparently a contentious topic, and I don't quiteeeee understand why. I mean, I do, but I also don't (more on that in a bit).
There are apparently two camps on the subject of out of character challenges. One camp says, "Riddles are fun! Puzzles are fun! Where are my riddles and puzzles at?"
The other says, "Pffff, plebians. Do you require your fighter to lift physical stones in your living room every time they try to make a Strength check? Riddles are IN-CHARACTER PROBLEMS, and should be solved with in-character methods. Just make it an Intelligence check or something and move on."
I've always stuck near the first camp, thinking blithely that riddles and puzzles were simply fun. I couldn't articulate why I disagreed with Camp 2, but I intuited that their argument failed somewhere. I thought: Couldn't you abstract everything into just a series of rolls? "Okay, I try to convince the king to give me a prize. My character is charismatic. Do I win? Okay, I get the prize. Now I go to the dungeon. I have a +12 in Dungeoneering. Okay, I beat it."
This isn't meant to be a strawman, but it is supposed to be reductionist in the absurd. Many people agree that lifting a boulder that's trapping your friend can be done with one dice roll, and that this dice roll should have narrative weight. Some people think that convincing an NPC of something can be reduced to a single dice roll, and that that dice roll should have narrative weight. Nobody seems to think that an entire adventure or quest can be reduced to a single dice roll.
Where's the line drawn?
Goblinpunch has two posts here and here that touch on this question a little bit. You should go read them. I'll wait. They essentially ask "What is being tested in your game?" Is it player knowledge? Character builds/system mastery? Real world knowledge? Luck? Acting ability? He eventually breaks down what he, as a GM, tests in his adventures as a percentage (giving about equal footing to mechanical analysis, creativity, and social skills) and asks other GMs to do the same.
In my style and tone of games, I see the character as an avatar in a fictional world. The character is a player's eyes and ears, hand and foot. If I talk to an NPC, I might need to rely on my character's intuition to see if that NPC is lying. I might need to rely on my character's eyes to find a hidden door in the stone wall. I might need to rely on my character's memory to know the specific weaknesses or defenses of an eldritch vampire. And, as the classic example goes, I'll need to rely on my character's strength to lift a gate or bend a bar.
But I still rely on my own thoughtfulness to know which gates to lift. The GM can put in challenges wherein a gate in a dungeon is a choice. That gate is holding back the minotaur, but beyond the gate there's also the minotaur's treasure. It's my choice - and not my character's intelligence - to lift or not to lift. Yes, it's my character's hands, because they're my only way to interact with that world, but my choices are paramount.
And when there's a puzzle, it's my own reasoning that can make or break the encounter. Yes, I might need to rely on my character's powers: his ability to spot the hidden clue, his memory of rhymes and riddles of his homeland to provide hints, his hands to turn the cranks - but it's my ability to choose that makes the game fun, and not just a series of tests and dice rolls.
The difference is: What can I (as the player) affect with my own self (skill, intelligence, hand-eye coordination, charisma, articulation, presence, thoughtfulness, memory) and what can't I affect? If I can affect it, I want it to be me - the player - to make the choice, through the avatar of my character.
Some of this question, I think, comes from assumptions about the game being played. This argument is often made in D&D circles, and understandably. Half of your attributes are mental attributes, and seem to encapsulate as much narrative weight as your Strength score. But would these same arguments hold up if your attributes were the Apocalypse World spread? Or Fate Accelerated? Or Everybody's John?
Like most things in RPG, the answer of "what is fun" is subjective. For some players, in-character acting is fun, and they want to play games that prioritize those sorts of interactions. For some players, logical thinking (ala riddles/puzzles) is fun and want to play games that prioritize those sorts of interactions. GMs and players need to have some consensus on the "what is fun" question when they embark on a game together.