Gen 4 definitely, most specifically Platinum.
With the amount of legendaries in it, I'm surprised how many of them are intermingled within the main game. The Creation Trio and Lake Guardians play some role within Team Galactic's ploy to recreate the universe or some nonsense. It has what I consider the second best story in the main series (Plasma), as it shows how deep rooted Galactic really is within Sinnoh with their main locations being two major cities, using the guise of capturing these legendary Pokemon as sources of alternative power. Cyrus' grand plan is actually explained with his nihilistic viewpoint in the world (not to mention his sentimental side in never targeting his home town) which is a lot better than other villain teams.
The introduction to some of my favourite Pokemon and the Special/Physical split, giving some old Pokemon better viability in the metagame made for some fun times during high school. The AI having a massive improvement over the previous with some form of intelligent design which gets improved even more in the next generation.
Finally, it has the best champion in Cynthia and a post game that is extremely rich in content.