Well, my students looked through all the classical rabbinic literature they could find, and they asked all the scholars they could approach, and discovered . . .
Nothing. Not one example of a situation in which the Torah or the rabbis recommend torture.
American law has the Fifth Amendment, the right not to self-incriminate, which may discourage some forms of torture. A resolute defendant can refuse to talk to the court. Jewish law goes one better. The defendant cannot confess. If the defendant confesses, the court does not listen. “A person cannot declare himself evil” (Yevamot 25b). If he says, “I did it; punish me,” the court must not punish him. Prof. Aaron Kirschenbaum, the venerable scholar of Mishpat Ivri, in his classic work Self Incrimination in Jewish Law, explains that this exemption obviates torture in a rabbinic court. Even if we could force a confession out of someone, the court will not consider it; so there is no point in forcing a confession.
My students found no precedent for any form of torture in Jewish law.
After services, Ezra Drissman asked about the man who refuses to divorce his wife, under circumstances where the court has decided that he must divorce her. Rambam rules that we force him until he says “I am willing.” I think it a good question. It requires further research.