Advantages of Rays of Death versus physical mediums of destruction (munitions):
-you don't run out of ammo - as long as you have a reactor producing energy and you don't overheat the cannons, you can essentially go on for far longer than physically stored missiles and projectiles could last.
-they are visually more extravagant than projectiles, which in a videogame translates to easier way to coolness
-For the same reasons, saves in storage space and weight, making your ship able to store something more useful like fighters, bombers and their munitions - bombs and missiles do have their uses, but cap ships are very well suited for carrying the big reactors that are required for beams, bombers not so much. A reactor big enough to power beams powerful enough to make a difference in a bomber would make the bomber really big and heavy and good target.
-they are cool
-They seem to have high damage/impulse ratio, meaning they pack a lot of energy while keeping the recoil to the firing ship minimum, reducing structural stress and need for suspension and course correction maneuvers that mass drivers would require for effective use. Yeah, if you fly your fighter or bomber into the beam, you're whacked around, but I suspect that's because the surface of your ship is vaporizing explosively and propelling you around...
-they are cool
-point and shoot interface reduces need for complex firing solution computers (how anyone can miss a cap ship with a BEAM CANNON in FS2 is a mystery to me); the beam seems to transfer energy so fast that on small to medium distances it doesn't need any lead, it hits the point in the crosshairs.
-did I mention they are cool?
Rather, projectile weapons and cap ship missile fights are more difficult to make cool. Don't take me wrong, projectiles are way more realistic and, if used in a capable game engine, are also really cool but practically require some kind of geomod for that to be honest. Or at least somehow better damage modeling than in FS2. Also, that way easily leads to autocannon silliness where ships expel more than their own weight of ammunition in a battle.