Super Mario 64 as the first 3D Mario game was as close as you can get to perfection, the movement was incredible, the level design consistent across the board and a great transition of themes and presentation from 2D Mario to 3D.
Super Mario Sunshine is the least polished of the bunch, a lot of collision issues and some glitchy physics, but it still retains a lot of the great level design and movement of 64, got a lot of mileage out of the tropical setting while still keeping areas feeling distinct and the more linear platforming challenges were a good change of pace in the middle of the more open 64 like levels.
The Super Mario Galaxy games, while don't feel as fluid and their movement not as expansive as 64 and Sunshine, they trade that with much more inventive ideas and level design. Galaxy was a great novelty for Mario, with its presentation, atmosphere and an emphasis on a more epic feeling storyline than the previous games, more akin to an adventure like its RPG spin-offs while keeping the mainline simplicity. Galaxy 2 is technically superior to the first game in almost every aspect compared except story, it has a better use of the orchestral score, even more inventive level design and ideas, and Yoshi, but is not as novel as the original game, could have kept the same gameplay premise but with a different story and stakes to avoid feeling like a less epic Galaxy 1 and stand tall with it, still both incredible games.
Super Mario 3D Land is the most standard of the series, it has all the ingredients of what makes an amazing game, but it lacks the flavor that the previous entries had, very much more like a New Super Mario Bros. in 3D, while still having more heart put into it than those. Super Mario 3D World fixes all of that, it keeps the 3D Land style but adds the creativity in spades of the 3D Mario games, is one of the most consitently good and inventive Mario game, by mixing a lot of ideas from every game while adding new ones. Only thing holding them back is that they don't feel very epic as a whole, but rather reach that peak brilliance at certain moments, 3D World may have the greatest Bowser fight ever concieved, but moments like those are only felt sometimes rather than the entire run.
Super Mario Odyssey is a game that eclipses every other title in its sense of adventure, Mario's movement is the best in the series, the world feels diverse and creative, and while the level of creativity across every kingdom can vary, they all have memorable moments even in the less inspired ones, the capture mechanic brings a ton of new ideas to the table, as the game keeps piling new enemies and things in every kingdom making them don't feel stale, is a pure joy to play.
As a rank it would be: Odyssey > 3D World > Galaxy/2 (I'll have to replay them to be 100% sure) > 64 > Sunshine > 3D Land
On the whole they are an amazing set of games, unmatched by any other 3D platformer.