Never did think about this, myself. I assume ordinary handguns (such as those used by the police) or rifles wouldn't be of much use against most modern doorlocks. However, perhaps a few shots at the door itself, between the lock and the doorsill might split the wood, and you could then kick the door open. Probably makes for good dramatic effect!
Didn't we have a thread a few months back, started by someone wandering why people behave in certain ways in the movies? Why, for example, do women living alone in deserted houses go to answer the door without looking through the peephole, or why there is always a free parking space when the bank robbers drive up to make a heist?
Hollywood probably never has been too good with logic ...