I'm pretty sure I am not the only one who has noticed this, but Galaxy has a very different tone from all the Mario games.
The Mario games have always been fun, lighthearted, humorous and jovial in its presentation and tones. Galaxy, on the other hand, is very different. Its quite epic, dramatic, magical, beautiful and even sad and heartbreaking. There are still touches of Mario fun, but its this change of pace that makes the game fantastic.
The story is not quite deep, but its definitely above the lacking storyline of Mario 64 and the cartoony cheesefest of Sunshine. Rosalina might be the deepest character in the Mario platformer universe.
Most characters have a straight forward story. Here is Peach, she is the princess of the Mushroom Kingdom. He is Bowser, he kidnaps Peach all the time and Mario rescues her. Rosalina, on the other hand, has a past, one that is not a happy one and its presented in a great way.
In my honest opinion, this is how Nintendo should evolve their franchises. Make gamers care for the character and be bold with their stories and presentation. Gameplay is important, yes, but gamers are more likely to remember a game if its presented in the best way possible.