I've been meaning to write this post for like three years or something. I've been watching Elementary, and it's mostly really good about psychology and investigative stuff. (They get the Miranda Rights wrong a lot, which annoys me -- they don't need to be read at the time of an arrest, but at the beginning of a formal interrogation.) (And also they pointed out that dental impression evidence is bullshit then built that whole episode on the premise that a dental match is conclusive evidence.) (But they're still better than a lot of shows.)
Torture has come up a few times, and every time it does, it results in the detectives getting new information. This is common on TV: torture is a horrible, horrible thing, but given sufficient extenuating circumstances, the ends can justify the means.
The truth, however, is that torture has been repeatedly and extensively proven to produce worse-than-nothing in results. Torture victims will say anything to stop the pain, which means: they'll lie if they think you'll stop when they tell you anything. They'll lie when they think the truth might be hard to believe. They'll lie if they didn't do it. They'll lie if you don't stop. They will spew an unsortable blend of truth and lies and the torturer walks away knowing exactly nothing they didn't know already, and, most likely, hearing what they wanted to hear regardless of what's true.
Torture is an exercise in false confirmation of prior beliefs, exactly the sort of thing that Sherlock Holmes should confidently dismiss, encouraging others to do so as well. It makes sense for it to come up: (spoilers) the first time, the thing Sherlock wants to accomplish is just to cause pain, because he believes his victim murdered his partner. The third time, it was Kitty, pursuing her kidnapper. In both of these cases the motive for torture was emotional. Both would have been great opportunities to explicate the problems with torture as an information gathering strategy.
The second time, Sherlock only threatened, which worked. This could also easily have been lampshaded.
They never do, though.
I'm in the middle of season 3, so hopefully at some point in the remaining 2 seasons worth of episodes one of the writers found something out and threw in a scene addressing the problem. In the meantime, this is likely to continue annoying me roughly once a season.