I'm not very good with riddles, but I'd really like to create some for my game. The situation takes place in a forest. I thought that perhaps the characters will be in a situation where on the one side they have a mountain, on the other - an abyss. After walking for some time there they will see a really high wall. Any attacks won't work. Instead they will need to solve 3 riddles that will appear one after another (the first is solved, the second appears on the wall and after that the third). Then the wall will fall, and behind it they will see an evil spirit of a forest (an encounter is inevitability here). Do you think it will be an ok-ish option for using riddles? Or maybe should I just leave this idea?
Behind the game philosophy for a 4e-styled game is the assumptions that you don't need to be intelligent to roleplay an intelligent character, just as you don't need to be strong to roleplay a strong one.
Giving your players a riddle would be OK - more on that in a second - but I feel like the "right" way to solve a riddle is through a skill test where the riddle event is just a different "graphic" for the usual mechanic.
The problem with riddles
A second has passed so here we are.
A riddle can be solved or not. If the riddle is not solved, what happens to the story? Is it still possible to keep adventuring without solving the riddle?
D&D does not really care about this kind of things. It just grinds to an halt without warnings when it happens.
In other words, while a system like GUMSHOE has mechanics to actively avoid such dead ends, D&D has none - this means that you can either think of another way to solve the wall problem or you shouldn't have any insurmountable wall at all, because if the players or the characters can't find the solutions the story just stops.
Bringing the parts together
A good idea to me would be having riddles where a skill challenge gives players a hint per success and failure just means you need to lose more rounds deciphering the enigma or finding a different way to bypass the wall.
Then I would have some sort of menace chasing the PCs, to make the time advantage from actually solving the riddles into a real benefit. Then they can face the spirit before the chasers arrive, instead of needing to face waves of respawning enemies while solving the puzzle.
A side note on GUMSHOE, since I've been asked in comments: the GUMSHOE system is used for investigative adventures and has the characters always find the main clues, while giving additional info on good checks. The players then need to find out the truth behind the clues, but the system allows them to get all the clues. A common D&D problem is when players fail a perception/insight/knowledge roll and completely miss a clue.
The GUMSHOE system is used in some popular games like Trail of Cthulhu and Exoterrorists.
I don't want to say that running a riddle is a bad idea, because it's honestly not, and because almost nothing is a bad idea in the right hands. But I do want to point out that using riddles properly can be tricky, and there's a whole host of issues you'll have to think about if you do want to use them. For example:
Most people, when they design riddles, design them for the players to solve. This is slightly different from designing them for characters to solve. Imagine you give them a tricky thing involving balancing weights and forces. Players solve it by drawing out the free-body diagrams and working through all of the math. Characters solve it by rolling "Profession: Engineer" because roleplaying a bunch of dwarves and wizards solving free-body diagrams is kinda boring.
This causes a few problems. Players can't play the characters they want to play. this is the intelligence-equivalent of penalizing a bard because her player stutters. Another is that it practically requires metagaming. Characters know things they wouldn't otherwise know because their players are solving a riddle for them. A third is that it can mess with the party roleplaying, depending on how your party plays. What happens when Wally the Wizard's player is stumped by logic puzzles while Bob the Barbarian's player is really good at them? You can help with these by allowing characters solve the riddles with rolls, but then why construct a good riddle in the first place?
Suspension of Disbelief
Let's face it, riddles are a terrible security measure.* Putting something behind a key or a password means that an attacker can't access it without getting that key or password (or finding a backdoor). But with riddles, the backdoor is built right into the design. You're trusting that all possible attackers are dumber than you. It's hard to convince people you're a terrifying villain if you defend your phylactery with "what's black and white and red all over."
There are a couple of ways riddles could be reasonably used as an obstacle. One if the riddle is flat-out impossible without prior knowledge. Then it's basically a password disguised as a riddle. Sampson's Riddle was like this. Another is if you're not securing something very important, want a certain subset of people to likely get it, and want everybody else to likely not get it. This path can work better than passwords to secure things if you haven't met the people you're working with, because you can construct the riddle around a shared body of knowledge. Imagine a merchant who wants to help cultists without being seen as a cultist sympathizer. He could give large discounts to people who can answer his riddle, a riddle that just happens to be much easier if you're familiar with the cult's teachings.
Limiting Your Players
Your players see a riddle on a door. They try to solve it for a while, get bored, and then kick down the door. But the door is too strong and doesn't budge. Okay, use some explosives to blast a hole. Sorry, the door is magically protected. Okay, dispel the protection. Oh wait, it was put up by an archmagus and can't be dispelled. Okay, phone an Int 40 and ask him. Too bad, he's too busy to help...
When you get down to it, you're playing the game with a group of people who are just as smart and clever as you are, and probably moreso. Each of their characters has a wide range of powers, equipment, and contacts. Nothing's ever going to go the way you expect it to, which is half the fun of gaming. If you force the game into "you can only continue if you solve this riddle" you're dramatically limiting what people can do, which can be very frustrating for the players. A good obstacle has several solutions you can see and many you can't, because your players are going to surprise you, often with solutions far more clever than you thought the obstacle required.
This is an extremely common problem with not just riddles but puzzles in general. Failing at most puzzles is very different from failing at most combat. When players do badly at fighting, they usually win but with serious consequences- more resources wasted, more dangerous place, the hostages are dead, whatever. When players do badly at solving a puzzle, they can't continue playing the game. They're stuck until they solve the puzzle.
This is unfair for the players and unfair for you. You only have a limited amount of time to play the game, so you want to make the most of it, and "players going over the puzzle again and again" is a terrible way to spend that time. It kills the game's energy and all around makes for a very not-fun experience.
Note that puzzles don't have to be this way. You can easily design them to be just like a good combat: succeed and you get to move on, fail and you move on with consequences. Keep the motion and use your time well. For some reason, most puzzles don't do this and I have no idea why.
Putting it all together
So how do we make puzzles and riddles fun to encounter? At the very least by avoiding these problems.
We avoid the metagaming by making it work in-universe. Characters should be able to solve it (or at least get very far) without player metagaming. For example, through skill challenges. This is an excellent opportunity to storybuild and roleplay, too. "Bob the Barbarian, this line of the riddle reminds you of horses. Why?"
We avoid the disbelief by making the riddle feel like a natural and reasonable obstacle. It could be clearly there to let certain people in. In the example of the evil nature spirit, maybe it's there so that druids and (mostly) only druids can access it. Maybe the riddle is implicit instead of explicit- instead of a giant wall you have magical brambles and the riddle is "solved" by working your way through. Or maybe it's solved normally and the solution somehow tells you the safe path. Maybe the riddle is jarring and out of place, but it's obviously because your opponent is an egotistical maniac.
We avoid constraints by being okay with players finding alternate solutions. Can't really say much more here. It's a little planning and a lot of improvising.
We avoid bottlenecks by making the puzzle bypassable with consequences. In the brambles case, you might be able to just push your way through it, but you're going to be badly cut up and much less prepared to fight whatever's behind it. Or getting the riddle wrong sets off a magic trap that has to be manually reset- the designer assumed nobody would survive the blast and didn't bother with more security. Or you can still access the magic fortress but now everybody inside knows you're Not One of Them and is mistrustful or downright hostile.
Of course thinking about these things doesn't automatically make your riddle/puzzle good, but hopefully this should make the big pitfalls a little easier to avoid.
*I'm using security measure here roughly as "you want a limited set of people to access something." You could secure a chest of gold or a location, but you can also secure a piece of knowledge or someone's services.
The Source of Riddles
Puzzles and riddles are a classic trope in dungeon-delving. Riddles, like all other elements of the game, should make sense. Think about who added a riddle, and why they added it. The classic D&D answer is "a wizard did it"; even though it's cliché, it makes a certain basic sense: wizards are smart, and a particularly egotistic wizard would assume that nobody would be able to get past his "impossible" riddles unless he specifically gave them the answer. Having the riddle on the wall will also help remind the wizard what the password is.
So: whenever you add a riddle, it should be logical. Who is adding the riddle on your wall? Why are they adding it? How do the riddles and the answers relate to the person who created them?
While you're at it, you should know why your players even want to solve the riddle. If they can accomplish their goals while simply bypassing your riddle, then they need more motivation. (And simply railroading your players at the riddle until they solve it or die usually isn't much fun.)
Riddles in a Game
Like any other obstacle in your game, you should have a plan for what happens if the PCs fail to overcome it. Combat doesn't have to be lethal; puzzles don't have to be mandatory. If the PCs either can't solve your puzzle or simply don't see the point, then the correct answer is not "force the players back to the puzzle until they solve it."
Figure out how you can advance the plot even if the players can't or won't solve the riddle. Why are they traveling right now? Whatever goal it is they're trying to accomplish, can they still complete it if they don't get past the wall? What's behind the wall that will help them accomplish their goals? (Your question doesn't mention if they have any goals. Do they?)
Once you've answered all of these questions, you'll have an excellent puzzle: your players will be motivated to solve it, but it isn't the end of the world if they don't.
I have some suggestions for your riddle wall. Firstly I think that a random unscalably large wall in the middle of a forest seems out of place. Instead have a magical forcefield emanating from the area where the spirit is. You can have a funny moment where the party members smash into it face first. Once contact is made the runes can appear in Arcane or Sylvan.
There should be different ways to pass the barrier so that the game doesn't get stuck if they party can't solve the riddles; for example they need to rearrange some statues, or press some runes on the wall in a sequence sort of like a magic combination lock. Or casting dispel magic if you have a Wizard in the party.
In regards to riddles this site has many many riddles that can be used.