At the aptly named but also very cool site Overthinking It, they have finished what was apparently a two-year-long effort to compile the results of all 456 episodes of Law & Order and plug that into a spreadsheet for analysis. You might or might not be surprised to learn that the prosecution won the vast majority of cases on the show, at least if you count plea bargains as wins. And that seems fair, since a plea bargain means that Law caught somebody and Order made a case strong enough to convince the alleged perp to agree to some jail time.
But the authors freely admit there is a subjective element involved, since at least some cases didn't involve a clear winner or loser. A plea bargain might not be a "win," or not feel like a win, depending on the circumstances. Interestingly, the data show that very few cases were resolved by plea bargain during the show's first two years, but that rapidly became the most common outcome until about season 14. Then the conviction rate went up substantially, and maybe more importantly, the rate of "not guilty" outcomes plummeted:
In that graph, the green line is the rate of "not guilty" verdicts, and the blue line is the number of viewers in millions. In other words, they point out, as the show's ratings dropped, fewer alleged criminals were getting off scot-free. But which one caused the other, assuming there is a cause-and-effect relationship there, is hard to say.