Doesn't he only come out at night wearing dark clothes and stays in the shadows sneaking up on people?
Also it's not as easy to shoot someone as you may think, particularly if they're moving quickly. The '66 TV Batman and Robin may have liked to pose and declaim before attacking their enemies, but their enemies usually didn't have guns. A more modern Batman wouldn't stand still to give them a clear target.
I'm remembering how the Mythbusters tested the saying "Don't bring a knife to a gunfight." They found that it actually is surprisingly feasible to battle a gunman with only a knife. It's possible to throw a knife (or batarang) and hit an opponent before they can draw, aim, and fire, and at close quarters (within 16 ft) it's possible to close to knifing (or in Batman's case, punching) range before the opponent can bring the gun to bear and fire.
And of course there's the added element of fear that Batman embraces. It's harder for someone to draw, aim, and fire a gun if they're scared out of their wits by this big bat creature swooping down on them. If they do fire, their aim is likely to be off, and not only due to fear and haste; part of the reason Batman wears a cape is to obscure his profile so people don't know where they're shooting. Plus he has body armor. His exposed chin is going to be a very difficult target to hit under those circumstances.