There is no official ruling for this, and I personally advise against the practice altogether as it is far more rewarding to actually solve the riddle oneself. Ideally you can avoid the problem altogether by how you place the riddles, so that they don't need to be bypassed with rolling. Still, in order to answer your question:
So, what rolls to make?
It depends on the nature of the riddle.
If it's a simple logic puzzle depending on algorithms and patterns, then I'd say it's based on intelligence. If, however, the puzzle deals with ethical questions and dilemmas, it might be a matter of wisdom.
Rather than just flat-out give the answer at a successful ability check, however, you could give the players hints at a successful skill check. A Knowledge: Religion check might yield a clue regarding religious symbolism, a Spot check might reveal that the eye of the statue can be pushed like a button, a Sense-Motive check might reveal the ethics of the puzzlemaker, etc.
Avoid the Problem entirely
In the end, my advice is to avoid this problem altogether. You can do this by making sure that all your puzzles are optional. Make sure that none of the puzzles have to be solved in order to progress the story. Sure, solving the puzzles might yield amazing rewards (physical, or in terms of discovery), without which it might seem impossible for the party to reach their goal. But in the end, the story should be able to progress without that.