Gen 4 overall, especially when including HGSS. Diamond/Pearl had a few technical issues but they still kickstarted that gen perfectly, great postgame, good story, my favourite region, and nearly every non-starter and non-legendary/mythical Pokémon available. Then Platinum came and fixed practically all of their flaws, and HGSS are the best example of a remake we got, with nearly everything both from the source games and their current generation being included. There was so much quality in those titles that gen 4 is still the peak Pokémon experience for me: I can't think of many negative things to say about them, especially because latter gens came to lack things that those games (and in some cases also DP) had. (Can't really blame them much for lacking later much-needed innovations like the Fairy type)
Gen 5 isn't really much behind; BW had the great starting point of Platinum/HGSS but while technically superior and having brought a good story (though not my favourite) and a huge number of Pokémon, some really great, I don't like them as much as gen 4; while a good chunk of the new Pokémon had great designs (I'm one of those who love the Vanilluxe line btw), a not-so-small number of them felt kinda unneeded or too similar to earlier ones, so the big number of Pokémon is a double-edged sword. Also, the no-earlier Pokémon was great for novelty but bad for type distribution - it kinda felt like the DP mistake again. BW Unova was especially bad to me, too linear and that made it feel little, especially coming after Sinnoh, and I felt like some of the areas were made just to push the DS without caring for gameplay (Castelia City is kinda a miniature Unova: yet more linear paths... I appreciate the effort in making that on a DS but I'd still have preferred a more regular city). Plus, I felt that they pushed for making each city graphically unique - which is not a bad thing per se - but in doing so they imho made Unova feel less consistent than other regions, which imho already had unique-feeling cities (again something that imho Sinnoh did better).
As for B2W2, they were an improvement over BW in lots of aspects (but not, imho, in the story), but because of Unova's flaws and certain other things that weren't fixed (like no VS Seeker) I still put it behind Platinum/HGSS. Though as a whole I'd put gen 5 ahead of any other non-gen 4 main series game other than Emerald.