Team Plasma (I'm not really going to count them as separate from the B2W2 iteration; it's all one thing in me head) is my favorite for the degree to which they actually attack the foundations of the Pokémon world's society, in a way that provides substantial and interesting commentary on the setting. They're a bit meta - a Pokémon villain team about the act of catching and using Pokémon, which is a story that could only work in this particular world. You can have a mob racket, eco-terrorists, a doomsday cult, or genocidal billionaires anywhere, but Team Plasma was the series taking a moment to interrogate itself and its own principles, and that's the way to my heart. Plus, I really like the whole N/Ghetsis dynamic, the way the Team Plasma story overrides the climax, the team's whole high fantasy aesthetic, and they all have such good fucking music too. Downside is, there's a lot of glut in their first appearance. The Seven Sages don't really do anything, and only two of them come back in any meaningful way for the sequel (where they're much better applied). And that's on top of the Shadow Triad, plus Anthea and Concordia. That's a lot of characters to end up doing jack shit with. Fortunately the few members that do get characterization are brilliant.
Second to them is Team Flare because like I said, they're genocidal billionaires, or as I like to call them, billionaires. The reason they come in second is because while that's a nice spicy snarl at the real world, it doesn't really make sense in the seemingly utopian Pokémon world, so the internal conflict doesn't feel very convincing. Still, the diversity of their team comp is quite nice, and Lysandre gets banger music two generations in a row. Though once again, the poorly utilized admin syndrome comes into play, though not to as egregious an extent as Team Plasma, with only Xerosic and Malva getting in some decent spots. Just recently I noticed that with the five scientists, Lysandre essentially has his own clique of friends just like you, the player, do, and I feel like that's begging for some kind of parallel to be drawn.
After that, I really like both Team Skull and Team Yell for gradually redefining the role that the "villain team" can be expected to play in the storyline, and both of them are used for some really nice worldbuilding. Team Skull's jokes (and music) were better though, and they get a lot of really fun and/or memorable sequences. I suppose that the Aether Foundation and Macro Cosmos, absent from the poll, are coextensive with these two. I feel that Macro Cosmos on its own is a bit weaker than the Aether Foundation, but the Cosmos/Yell dynamic is more organic and interesting than the Aether/Skull one.
Rocket, Magma, Aqua, and Galactic (notably the pre-"we do character stuff now" bunch) all kind of sit together at the bottom for me. Probably in that order, too - Rocket is fine, especially for starting out, but they're not very remarkable or interesting. Magma's plan is pure comic book excess, but it at least makes more sense than Aqua's. And then Galactic I just... they're the most excusiest excuse to have an antagonist yet. A bunch of bowlcut-wearing astronauts too stupid to actually know why they're doing what they're doing, and the boss literally comments on this. And speaking of him, what I think are all the most interesting tensions within his character are never commented on at all, and he's given the excruciatingly unconvincing motive of "Mommy wanted me to make straight As and pushed me too hard so now I want to become God and destroy everyone's soul."
Oh and I guess Team Rainbow Rocket is a thing. That was... fun, had some really great music to it, but boy oh boy did it waste the one-time opportunity to have these diverse, over-the-top characters actually interact, as well as you know, including Mother Beast Lusamine among them so that the reformed LUSUMine could confront her sins, all so that instead we could have Giovanni ramble about wanting to take over the universe with Ultra Beasts.
Team Rocket because of how prolific they are. Even when they disbanded at the end of Gen 1 they still managed to linger at the Sevii Islands and they re-emerged in Gen 2. Then of course Rainbow Team Rocket was involved in Alola which shows that they never really stay down and I like that.