Well that is a hard question. Often when I have ran a game if I was close to wiping out the party due to extreme luck on my rolls I would tone it down. If the players could see my rolls then they would not have enjoyed the gaming sessions knowing they should have all been killed. By keeping something secret I was able to give the party an enjoyable night where they felt truly epic in the victory they had achieved.
Buddha is on the right track.
For suspense, I allow the players to see the dice rolls.
For secrecy, I already have the rolls done before the session and the encounter, unless it involves combat and then I always shake the dice for my players, but won't let them see the results.
I will allow the Players to see some of the dice rolls but not all of them. It all depends on the situation. I have a dice roller on my cell phone and I can tell you at times it rolls great and other times not so much. I use it on all my die rolls when Dungeon Mastering.
When World of Medieval was being played we could see both the Dungeon Master's rolls and ours so before the battle even started we had a pretty good idea of how it would turn out.
It depends on the group really and how much emphasis they want to place on things like immersion versus casual play or even a simulationist style of play. If the group desires a great deal of immersion I would suggest having the Dungeon Master make all of the rolls and never or very rarely revealing the results because the mechanics can break the sense of immersion as the player has to stop their narrative to roll a dice then start adding up modifiers.
If a group is focused on character development and would be offended if their character died then the Dungeon Master would be wise not to reveal his/her rolls because they may need to fudge the results in order to prevent character death (Though in my opinion if you're going to fudge then don't bother rolling, just announce the result that you want).
Revealing the dice rolls might be more appropriate for a simulationist though; like a group trying use numbers and modifiers to simulate reality… such as those who enjoy wargames or those who place less emphasis on the role playing part of the game and more emphasis on the mechanical/system elements of the game. It may also be appropriate to reveal the rolls when the group is more focused on shared storytelling with less emphasis on the role of the Game Master as arbitrator of the rules because the player, and not just the Game Master, can change or adjust their narrative based on the results of the dice.
I'm not opposed to revealing my dice rolls as a Game Master, because if I roll I take the results and generally do not fudge the roll, so I have nothing to hide. However, I am inclined to hide the results when it comes to combat because seeing the result of the roll may prompt a player to metagame,consciously or unconsciously.
For example (Using something like Dungeons & Dragons or Pathfinder) the opponent rolls a six but still hits and the character has an armor class of 16 then they know that the opponent is getting at least +10 to the roll and I think the player would have a hard time not allowing this knowledge to influence how their character reacts in the game.
There are many good role players out there that can, and do, override the urge to metagame and these players can have their character respond to a situation in a way that is not in their best interest but fits with how their character would most likely react. But there are also players who would see the result of the dice and have their character react in an uncharacteristic manner in order to prevent negative consequences for the character. Whether the Game Master reveals the results is going to depend on how they feel about these issues, and how their players feel about it as well.