It was during Gen 5 (especially the second half of Gen 5) and first half of Gen 6 for me. It was the time when I finally started understanding a concept of building a good and fun teams so because of that I had some of my best and most memorable playthroughs during this period. This is also the time when I became aware of the competitive battling and I spent a lot of time learning and battling with many different "competitive" teams that I tried to build. I also spent a lot of time breeding for competitive Pokemon with Egg moves and Hidden Abilities, especially during the early days of Gen 6. I also discovered the "Pokemon side" of YouTube during Gen 5 and learned about shiny hunting and nuzlockes so I tried doing both during this time period and I had a ton of fun with it.
This was also the first time that I actually followed the release of the new games (X and Y) from the first trailer and never missed any update (even a few fake leaks managed to fool me for a couple of hours). Following the release of Gen 6 was an amazing experience, especially since Pokemon was moving to 3D. The Mega Evolution reveal was so amazing and I'll never forget the hype during those days.
You can also see that this was where my love for Pokemon peaked because Gen 5 is still my favorite generation and Gen 6 (especially first half of Gen 6) is my favorite competitive period in Pokemon.
I had a very similar experience, I started getting into breeding and team building in late Gen 5 (back when you could generate Pokemon with apps too but once I got into breeding I enjoyed that much more). The competitive scene at the beginning of Gen 6 was really fun for me too. My friends and I were playing alot, building teams, and battling each other all of the time. YouTube had a really good WiFi battling scene too with Shady, Shofu, Nappy, and many others.
It was the first time I had played Pokemon in years, my last games before B2W2 being HG/SS and it just renewed my love for the franchise. I was also just coming out of a pretty brutal time in my life and the community is a very nice place to be.