Both are great games with pretty significant flaws.

Super Mario World is thought of as a much larger/longer game, but I think that's true to a lesser extent when you really look at it. Mario moves kinda slow, making the same stretch "seem" longer. When I play Super Mario World, I find myself continuously holding down the run button, which to me indicates that they did something wrong. Each area would contain rather similar levels grouped together, and further repetition with the ghost houses and castles. Some of the levels were basically straight lines, and some were extremely short. I didn't mind Yoshi, but I don't feel he really added much to the game either, and the cape feels like a lamer version of the raccoon. I didn't like the "!" blocks/rooms, which felt pointless. The "secrets" where you take a key to a keyhole sound better on paper than they actually are. In practice, when I play the game, I skip most of the secrets and the Star Road. Most of the bosses are pretty lame, too, and the game overall is on the easy side.

Sonic's levels are much more detailed, vibrant, and interesting. But there's still some repetitiveness in having three acts to each zone. I like the special stage aspect of the game, but the special stages themselves are just okay. Arguably the game is a little too short and basic. But I find myself coming back to it to try to beat my times, an element of replayability that SMW doesn't have. I also think Sonic has much better music.

Pretty much a tie, in my eyes. As an aside, I think it's interesting that Super Mario World has a somewhat better critical reputation, but Sonic was much more influential. With games like Jazz Jackrabbit, Socket, Zool, Kid Chaos, Awesome Possum, etc. it seemed like everyone was ripping him off. You can see a lasting influence in games like Crash Bandicoot (and even the commercials for Crash Bandicoot).