Torture is not a pleasant topic, but it is something that could realistically come up in many RPG genres and scenarios.
If there's a justifiable reason for PCs to be tortured in a game, try relieving the horror and foreboding by making the torturers really pleasant, cheerful people who enjoy their job.
Another neat tip is that it's difficult to physically torture your players(*), so it can be tough to elicit the desired information/confession out of their characters through player/character sympathy. So go for psychological torture instead! Follow the example of the Venetian Republic, which used to lock prisoners in a dark room with only the moderately painful inconvenience of being suspended from the ceiling by ropes tied around the wrists. Inform the prisoners that this is stage one of the torture process. Hire people to sit comfortably in adjacent rooms and scream hideously. Use the word "hideously" to describe their screams. Use it a lot.
This was the only form of torture used by the Venetian Republic. Records show that it elicited confessions almost without fail(**). That should be good for a hideous penalty on the PC's Will roll (or whatever other game mechanic is used to resist torture).
Mwuah-hah-hah-hah-haaaaahhh!!!
(*) Unless ordering not enough pizza counts.
(**) At least, this is the story told to me (DMM) by the tour guide while visiting the dungeons of the Doge's palace in Venice. It may be slightly distorted from the truth, but it makes a good story for this annotation.
(Serious note) Torture can be a touchy subject for some people. Do not simulate it, describe it, or even mention it in RPGs unless you are absolutely sure all of your players will be okay with it.
Transcript
Darth Vader: Princess Organa. I trust you are comfortable.
Leia: Go to hell.
Darth Vader: We're on the trail of those plans you stole.
Leia: I got no idea what you're talking about.
Darth Vader: We traced them to a desert Rebel hideout.
Darth Vader: Your defensive arsenal impressed even me.
Darth Vader: But the lubrication oil was contaminated with dust. When the weapons jammed, my troops overran the place.
Leia: You fiend.
{a sinister-looking spherical droid with a large hypodermic needle approaches Leia}
IT-0: Ooh! Ooh! Another human to play with! You can both relax, I won't go for the eye this time.
Leia: And here I didn't think you had any balls.