Larry Correia gives the business on guns and fiction.
In short, make sure you know what you're talking about otherwise you'll snap the reader right out of the work.
I recall one time I was editing a scene for an Irish friend who had never shot a gun, and it showed. The fellow thought that when you pulled the trigger each stage of the action's motion moved slow enough that you could feel each part.
But it's not just guns. It's anything you want to write about. Or as Larry said "It's like having your character get into the car through the trunk." Now not everything you can experience, but (provided you live in the free world) firearms are.
"And all of these things are easilly countered by talking to a gun nut for 5 minutes, or going to the range yourself, even just once."