I just found all that interesting, having never considered it before, and it reveals a cultural undercurrent. Before comic books the hero was the iconic cowboy. And the good guys CERTAINLY packed heat along with the bad guys then. In the enterainment media and romantizations.I think that a large part of it is because guns are perceived as fatal. You can't shoot people "just a little bit".
Comic book heroes, by and large, do not kill bad guys; they tie them up and hand them over to the cops, at least metaphorically. If your hero had a gun, all he could do with it would be to shoot guns out the bad guys' hands, and that makes him pretty much a one-trick pony, even worse than Aquaman, who can not only breathe water, but can also talk to fishes, two important skills for stopping super villains, apparently. One reason Wolverine was considered such an "edgy" character for mainstream comics when he appeared was that he killed people. (Of course that trope has been done to death now.)
The other big part is that mainstream comic book companies are creatures of the Urban Northeast, where guns are the almost exclusive province of cops and bad guys. Curtis Sliwa was a media darling and Bernie Goetz was a dangerous vigilante in that world.