Talkingpointsmemo has a discussion of whether torture is ever justifiable and should be legalized here and here (my oh-so-slightly-less-famous blog hit the topic too here (scroll to June 8). Talkingpoints' discussion recognizes the justifiability and legalization are two different things. The point I would add is that society should calibrate its decision on what should be legal based on what will happen as a result. Liberal lawyer Alan Dershowitz says torture will happen regardless, so it might as well be legal and regulated. As we've seen with the Bush administration, though, even semi-legalized torture has been completely abused.
I can imagine the extremely rare circumstance where torture would be justified, and I agree with Dershowitz that torture will happen. Where I disagree with him is in concluding that it should therefore be legal, when legalizing will bring vast amounts of "bad" torture, both legal and illegal. I think making it legal messes up the calibration. If something should happen, but only very rarely, the best way to achieve that result is (in this case) to make it illegal.