We've always had good music in pokemon games. Thank you Junichi Masuda!
From a musical perspective I like gen 4 or 5 best. They both really have some great battle themes. Since my #1 all-time favorite theme is Ghetsis' in the original Black and White games, I guess I gotta give the edge to Gen 5. Also in my top 3 would be Colress' theme from BW2. Iris' theme in BW2 as champion is nothing to sneeze at either.
There is a lot of solid ambiance music for a wide variety of locations, and in the world tournament you hear some very ambitious remixes of well-known themes.
This gen also met the challenge of writing a diverse selection of music related to N. He not only had a pretty good battle theme, but the music for his room is really interesting and disturbing. His castle itself is practically a character with two different yet I think equally potent musical choices from the operatic and majestic sound in the first games, to a more funeary dirge in the sequel when you return to find his homes in ruins.