Even if that's true, it doesn't logically follow that every comedic or light-hearted movie must fail. Correlation does not prove causation, though good luck convincing any Hollywood executive of that.
There's comedic, there's light-hearted, and then there's just plain mocking the comic characters you're presenting. You can almost hear the studio execs in the background going "Seriously people, what do you rubes see in these spandex-wearing muscleheads anyway?"
The people behind the Marvel movies are open and proud fans of the comics they're adapting themselves. They love these characters. They know what parts of them would work best on screen, what wouldn't, and what needs to be tweaked. (Sometimes, as with the Incredible Hulk, it takes a couple of tries to get it right.) Except for Donner, Burton (debatable) and Nolan, the closest the DC/WB filmmakers got to the actual comics they were adapting was a brief browse at Barnes & Noble. (Or at least one gets the distinct sense of that.)
And there are probably exceptions. I haven't seen Constantine, but did it take itself seriously?
I haven't seen it myself. I suppose it did, though I doubt anyone could take Keanu Reeves seriously after The Matrix Revolutions...
And Superman Returns took itself very seriously but evidently wasn't well-liked enough to warrant a continuation.
That movie's premise was inherently and fatally flawed from the outset. If you're gonna make a direct sequel to Superman II, ignoring the following two films (sensible), you can't have Superman going from "I won't let [Earth] down again" (II's last line of dialogue) directly to abandoning Earth for five whole years on a wild goose chase to find Krypton (after his holodad told him Krypton was gone) and expect to keep the audience's sympathy. That's a whole different kind of joke, and it's on the audience - a fundamental betrayal of the character, before even getting to all (truth, justice and) "the other stuff" that happened in that film. And the ending of that film left any continuation written into a corner that there was no good way out of without doing some serious damage to the wider franchise.