For decades, the judges on television courtroom dramas and police procedurals were adjudicating enigmas. From "Perry Mason" to the capacious "Law & Order" franchise, they did a bit of overruling here, a little sustaining there, demanded order as needed and, at the climactic moment, called for the verdict. What did these blank-faced, black-robed benchwarmers think? About anything? Now, there was a case worth cracking.

"Growing up watching 'Perry Mason,' I can't remember many of the judges doing more than ruling on evidentiary issues. You didn't feel you knew them at all. But on modern TV you do get a peek behind the veil," said David E. Kelley, who was one of the first to lift that veil as the creator of shows like "The Practice" and "Boston Legal."

Ryan Inzana

The former featured the sexually rapacious Roberta Kittleson (played by Holland Taylor) who skillfully and unrepentantly seduced her law clerk, made advances to litigants, and ordered those who displeased her to go stand in the corner—all while making impeccable legal rulings. The latter included Clark Brown (Henry Gibson) who—so much for judicial restraint—reacted to witness testimony with commentary like "shocking," "disgusting" and "outrageous."

But in exposing judicial tics, quirks, bluntly stated biases and ethical failings, "The Good Wife," now in its third season, sets a benchmark. Witness Judge Richard Cuesta (David Paymer), who has no tolerance for being interrupted and even less for naughty language—those who appear before him must substitute the word "fluff" for profanity. And witness Judge Charles Abernathy (Denis O'Hare), a committed blood donor and a committed liberal—but, he wants you to know, fair-minded—who's convinced that lawyers are less likely to be at each other's throats when seated and leaning back in their chairs.

There's also Judge Lee Sutman (Chip Zien), who reminds lawyers that "unless I point to you, you do not speak"; Judge Felix Afterman (Jerry Stiller), who frequently nods off in court and tries to disguise his snoozes as time when he's "thinking"; and Judge Patrice Lessner (Ana Gasteyer), who insists that lawyers preface every statement with "In my opinion" to make it plain that such statements are in no way to be construed as facts.

Robert and Michelle King, the husband-and-wife creators of "The Good Wife," had long viewed TV judges as untapped sources of drama, conflict and surprise, pointing, as a model, to 1959's "Anatomy of a Murder," the big-screen adaptation of a novel by a Michigan state supreme-court justice, John Voelker. "There was a sense of the judge [played by Joseph McCarthy's nemesis Joseph Welch] having a personality, and having likes, dislikes and interests," Mr. King said.

The Kings had also chafed at the fusty tropes of legal dramas, chief among them witnesses breaking down on the stand—file under Mason, Perry—and the passionate closing argument that saves the day and saves the defendant's bacon.

"There's a certain rhythm in courtroom dramas, and that rhythm usually involved it being a debate between two sides—the prosecution and the defense," said Mr. King. "Then the authority, the judge, comes in and offers a binary answer, either yes or no. We wanted to make the usual strategic moves in court more complex by adding a third side, a judge who would have quirks and biases so the chess game was never two-sided. The players—the lawyers—would have to take into account a referee who every now and then flicks a chess piece from the board."

What followed from this thinking, Mr. King continued, "was that the judges should be interesting in their own right: unpredictable, real and far from omniscient." Even a little zany, if perhaps not in the same league as the jurists on the comedy "Night Court" and the comedy-drama "Ally McBeal." "At a certain point courtroom drama grinds down into tedium," Mr. King said. "One of the ways to avoid that is comedy."

The complicated, complicating judges have made the courtroom scenes livelier. They've also made for a nice thematic fit. "'The Good Wife' is about things coming at Alicia from all sides," said Ms. King, referring to the often beleaguered title character (Julianna Margulies), who goes to work as an associate at a large law firm to support her children after her politician husband (Chris Noth) is jailed in the wake of a sex and corruption scandal. The unpredictable judge is "yet one more side that something can come at her from."

Giving judges more dimension and more face time doesn't mean they're ready for their own series, however, though the USA network's "Fairly Legal" has a mediator as its central character. "It would be difficult because they're decision makers in the course of the trial but you can't involve them in a case to the same extent you can involve a lawyer," said Mr. Kelley, whose legal drama "Harry's Law," now in its second season, uses judges sparingly.

"In 41 minutes, sometimes it's all you can do to service your main characters and you don't have time for the judges," he added. "Sometimes my scripts run to 70 pages because I've given the judge a bit to do. When you have to get tough and edit the script, sometimes it's the judge's material that goes."

Robert and Michelle King have a friend on the bench who would be happy to have some of their judges' material go as well. "He thinks some of what we do is flamboyant and shows a little disrespect for a judge's authority," said Mr. King, who concedes that "The Good Wife" "went a little broad" in the middle of the second season, and that it's time, perhaps, to pull back a bit.

"Of course, TV shows deal with the extreme," he said, "because that's most entertaining."
