I love both franchises a lot. However, I've spent more time on the Mario franchise, starting with Super Mario Bros. 3. In terms of which character is cooler, Sonic is my choice.
You see, that is a very interesting question. Sonic is definitely "cooler". I mean, what's so cool about an overweight plumber? However I think that Mario is a much more iconic and fun character. He is the father of platform games. The original Super Mario Bros. game is just so fun and addicting. Mario and Sonic are both good characters, but they're nowhere near as cool as Link.
Until I can find a quote thats really deep on a spiritual level, I'll just put this here.