For me, Miami Vice was at its peak during its one quality season - the first one. It's not an accident that they were nominated for 14 Emmys that year.
Looking at Season One, there's only maybe 3 episodes I'd see as misfires. And even those episodes have a consistency of tone and urgency that puts them a few blocks ahead of what would come later.
Season Two immediately founders with "Prodigal Son", as most of the dialogue is fairly bad, the music is mostly recycled from 1st season episodes, and the show seems to be embracing inset music videos over the actual story content. (In the first season, such moments were designed to emphasize the drama, not interrupt it.) There are still a few good eps in the second year - notably "Out Where The Buses Don't Run", "Bushido" and "Payback". "Definitely Miami" has a nice mood to it but every time the beautiful guest actress or Ted Nugent open their mouths, wow... As I understand it, the second season suffered from the absence of Michael Mann, who was gone for most of the year, dealing with the production of Band of the Hand, his own directing project of Manhunter, and the Crime Story pilot. By the time he returned, the show had already been deluged with angry hate mail - enough that NBC actually admitted this in a story on the news one night that year. Some years later, Maurice Hurley would admit that "Prodigal Son" was so bad of an episode that it turned many viewers off.
Season Three makes a strong attempt to spice things up - but not in the ways that the show really needed. Michael Mann famously at the time said that he didn't want to see any more pastels. So they went for a day-for-night, midnight blue kind of look. The cast were all given makeovers. Enzo Ferrari provided a brand new Testarossa to replace the Daytona kit car of the earlier seasons. (And frankly, I prefer the look of the Daytona - the white Testarossa looked more like a spaceship than a sportscar...) In terms of the stories, Dick Wolf was hired to run the show while Michael Mann focused on the first year of Crime Story. The result was that Miami Vice's stories began to look like what we know see on Law & Order - current events ripped from the headlines. Looking at the first batch of subjects, they include an IRA plot, the Contras, drugs mixing in with the Jai Alai scene, corruption in the prisons, gang violence, the death penalty, baby sales, etc.. When you look at them all together, it does wind up looking odd for a show like Miami Vice. The season did provide some good eps - notably "Lend Me an Ear", "The Savage" and even the death penalty show "Forgive Us Our Debts". And I'll give them points for ending with a show centered on Saundra Santiago which actually gave her some room to act for a change.
Season Four started with a strong attempt to get back to the basics of writing the show - with Michael Mann involved in the early goings-on. (It's telling that in his absence Crime Story quickly spiraled downward and never recovered...) There's a bit of Dick Wolf current event material early on, but there are also some signs of them trying to find good stories that fit this show. The first batch of episodes have some strong ones in there, including "Contempt of Court" (although it replays one beat from a 1st season ep), "Death and the Lady", and even "Child's Play" and "God's Work", in spite of the latter two episodes offering overly pat resolutions. Yes, there were two odd episodes in there - the frozen Rastafarian and James Brown are head scratchers for sure... Once Dick Wolf jumped back in around the 8th episode, things got back to his usual mode of current events, with the situation probably hitting its lowest points with "Indian Wars" and "Honor Among Thieves?", both of which have positively ludicrous finales. (Although I still love the sight of Castillo working undercover in the former episode - I just wish they'd found better material for him...) And yes, the fourth year had the awful clip show to boot. As usual, the cast got their annual makeover, and the pastels came back in. To my mind, the final two episodes of the fourth year were easily their strongest - "Deliver Us From Evil" and "Mirror Image" stand up pretty well with most first season eps - with the final episode standing for me as both an effective cliffhanger and a fitting sendoff for the series.
Season Five is an absolute disaster, as far as I'm concerned. I frankly am unable to find even a single redeemable episode in the pile. There's so much wrong in the final year that it's hard to keep track of it all. The writing is terrible, the dialogue is unbelievable, the cast look bored as they go through the motions, the pastel look of the series is now practically gooey, and the Jan Hammer scoring is now replaced by Tim Truman, whose music sounds okay the first time I hear it and begins grating immediately thereafter, etc. The only cast member who appears to be trying to do anything is Michael Talbott, who shows up in better shape than in any prior season. I'm shocked to hear cast members saying on the "E!" special that they didn't realize that the series was over until after the fact, when that final episode is clearly designed as a series finale. (By the way, there's a writer credited as "Frank Holman" on the final episode. That's obviously a pseudonym, since that's the name of one of the main villains on Crime Story and was the real name of a crook that Chuck Adamson pursued as a cop in Chicago. I figure it's probably Adamson, who may have been angry at the way the story was done. Or it could be Mann himself. We'll never know.) I'd be happy to entertain the notion of a single one of the Season Five episodes being presentable, but I haven't found it yet.