At their heart, they're both escapist fantasies. Which is to say, more than being relatable, they're supposed to be an escape from reality. A wish fulfillment as mentioned ^. Superman is the strength and virtue everyone likes to possess. Dead parents and blah blah aside, Batman is all your material and physical ideals and dreams personified.
Your mileage may vary on the relationship between form and content (or even if they are valid distinctions rather than two vaguely defined constructs), but regardless, art is an inseparable part of comic's narrative and aesthetics. So yes, it is important to a comic's story, since a story would not even be a comic story without art.