There are two basically distinct situations that Torturer might be played in:
1. You know that no more Torturers will be played against you this round (ie, your opponent has only one Torturer, or they're out of Actions after playing this Torturer (or other, rarer circumstances).
In this case, you almost always choose to discard. Unless, you know, whatever. You have a Trader or Watchtower, or you'll be able to end the game and win (even with the Curse) if you don't discard. Fairly straightforward.
2. You think that there is a possibility of more Torturers this round.
You are much more likely to want to take the Curse in this case.
Now, first, some comments:
If your opponent has activated a Village/Torturer deck, and thus you can expect to be Tortured multiply every round for the foreseeable future, in many cases, that's gg, and it doesn't much matter how you play it. You should probably just concede unless you're playing multiplayer or you have a clear understanding of how you can come back into this game.
But if you do think that you still have a shot at winning, and you're being Tortured one of potentially several times this turn, some things to think about:
a. Is discarding painless?
That is, do you have two green or otherwise valueless cards in your hand (conflicting terminals, whatever)? Do you have a copper whose buying power you don't plan to use? If so, discard. Hey, your opponent might not Torture you again, and if they do, you can take the Curse then.
b. Is the hand totally worthless anyway?
Is this going to be a "buy a Silver you don't need" hand? If so, you might just go ahead and discard into it, knowing that you're going to discard the hand into nothing and that's fine.
c. Are you super-Curse-adverse?
Does your deck really clog quickly with Curses and you have no way to get rid of them?
d. If not, probably take the Curse.
It's better to have a couple of Curses in your deck than lose tempo, and you need to keep tempo if you're going to have any chance to regain the upper hand against an activated Village/Torturer deck.