The ray gun is ubiquitous is sci-fi and fantasy. It goes by many different names, blasters (Star Wars), phasers (Star Ttek), death rays (various), et al. but the concept is the same: an energy beam is fired from usually a hand-held weapon towards a target, and the target either a) disintegrates, b) falls down dead, c) melts, or d) some combination of the previous (c.f. Dr. Who).
I like the ray gun. It's an awesome concept and very visual for sci-fi on the screen. On the page, not so much, as it's not much more than a gun where the bullets are light beams. Still, the importance and sticking power of the ray gun, by any name, is indisputable.
That's why I've got to take 'em down.
Here's the problem, especially with the ray gun that disintegrates the target: The thermal output of the blast would destroy more than just the target, it would take out everything nearby, and potentially the person doing the blasting.
Intuitively, this makes sense. Imagine boiling water, and how long it takes for all the water in the pot to evaporate and how hot your stovetop gets in the process. Now imagine the pot is a huge caldron capable of holding 23 gallons of water (about half a wine barrel, or one human being). Then you boil it. Instantly.
The steam alone is going to melt the varnish right off the cabinets. Next door.
I imagine that there two ways that sci-fi writers envision their ray gun (if they put much thought into trope at all). First, the least interesting: The boiler. This ray gun heats up the target so much that it eventually steams out and evaporates. Not that sexy, but more energy efficient if targeting organic water-based targets. Rocks and steel doors aren't going to respond well to this treatment. Their molten point is so much higher that set on "boil human" a large boulder is going to cook lichen and not much else.
For heftier loads there is "The atomizer". This is a energy weapon that actually breaks apart the atomic bonds that bind the target together. For those of you who got a passing grade in high school physics, congratulations, you've correctly identified this as a nuclear weapon.
Assuming in either case the portable energy required to perform mass destruction on such a minute scale has already been solved (and if so, then it's a total waste of destructive power to simply use it on glorified guns), we've got a few problems.
First, thermal output. Whether we cook the target with heat or fission them with gamma rays, the heat and radiation emitted is going to be bad for anybody standing near by, such as the person firing the weapon. Torchwood gets 10 points for using guns when logic would dictate energy weapons. Bullets is the bomb, baby.
For the fission case, we're going to have a massive output of gamma particles. Think cancer. The person/alien being obliterated isn't, in that moment, totally concerned about cancer, but the person firing the hand-held cannon might be, and they've just upped their odds of dying of melanomia to 99% in the next five minutes.
That isn't to say there isn't a place for energy weapons in sci-fi. The Death Star from Star Wars is immensely intimidating (though the poor bloke in the first film who is only a few meters from the blast is toast, poor sap). Phasers in Star Trek, I've read, somehow enshrine the target in a radiation-limiting field, and they tend to usually be set to stun (and don't get me started on how that would work either. Every Starfleet initiate has an advanced degree in anesthesiology?!?!)
So as a task to the aspiring future sci-fi writer, imagine what energy weapons would really be like. And then just use grenades and guns.