I think if you rate them at the time of their release it'd be something like:
64 > Galaxy > Odyssey > Galaxy 2 > Sunshine
But rating them now, with 64 obviously being dated (but still amazing), and Galaxy 2 definitely being better than Galaxy even though Galaxy was more of a surprise since Galaxy 2 just refined and improved on the Galaxy formula, I'd say, ignoring nostalgia:
Galaxy 2 > Odyssey > Galaxy > 64 > Sunshine
Never played 3D World but it just looks less interesting than any of the others.
The next 3D Mario game should be on Switch and should be Galactic Odyssey, that melds Odyssey and Galaxy together, with Cappy and a variety of tiny planetoids with larger ones making up levels. Then they can put these two great Mario concepts to bed and bring something new next gen.