Honestly I've never really thought that Navy crews were particularly poorly armed for boarding actions. Obviously it varies a lot, as
@Maugan Ra says, and merchant vessel crews are often pretty poorly armed because of course they would be. But in general the "standard" seems to be the naval shotgun, regarded as a heavy and very formidable weapon by the standards of the combat shotguns used by the Guard. These are kept in arms lockers, and issued to ratings when a boarding action happens; a lot of mutinies revolve around getting access to the arms lockers. Officers will carry sabres and cutlasses, as well as pistols. In the
Eisenhorn novels, Naval Security are portrayed as essentially up to the standards of IG Storm Troopers, if a little better, although they're not hugely mentioned elsewhere. Regardless, elite detachments of marines or the retinues of individual captains make a lot of sense, and elite detachments are a campaign refit in
Battlefleet Gothic.
Looking at the armament more closely, I would keep in mind that shotguns are pretty much the ideal weapon for fighting aboard
ships. They put out a lot of hurt over a palm-sized area at close range, which is ideal when fighting in corridors, and the shot is low-energy enough to avoid going through bulkheads and causing decompressions or hitting something important. Flamethrowers or grenade launchers? Would often be a lethal liability in confined spaces. Las-carbines like those carried by the Guard would be
possible, sure, but not actually advantageous over shotguns in either lethality or safety aboard ship. Specialised stuff like melta weapons for getting through hulls or airlocks would be useful, and better ships might carry better equipment. I also suspect breaching charges or concussion grenades might be carried by warrant officers; you don't want ratings killing an entire boarding party from overpressure.
It's a misconception, I think, that the Navy has poor equipment for its crewmen because they can't be allowed to conduct major planetary invasions alone. This second part is true, but the kind of things that are the main killing tools of a planetary army are
artillery, tanks, vehicles, and crew-served weapons. Plus the logistical and communications structure to make all of that actually an effective combined-arms machine.* What kind of guns the crew carry are honestly not especially relevant in that kind of calculation. Naval vessels will carry the standard complement of sidearms which are actually useful to their mission, plus whatever their captain can scrounge up, or minus whatever they sell off from the lockers if they're corrupt.
Lastly, in my view it wouldn't be correct to say that boarding actions are rare occurrence for the Imperial Navy. They are portrayed as frequently being a major part of the closing phases of naval engagements, since capital ships are easy to cripple but relatively hard to kill, and can be valuable taken intact. Against Orks and Tyranids, two of the most common enemies of the Imperium, they're almost a certainty at some point. But leaving aside major battles, remember that the day-to-day job of the Navy is patrolling Imperial space, protecting and policing commerce, and hunting down pirates. This means a great deal of boarding merchantmen to inspect their cargoes, and some of those merchantmen
will actually be pirates masquerading as merchantmen, because that's how most pirates actually operate. Being able to draw up good boarding parties is a necessity, for any Captain worth their epaulettes.
*(One can to some extent make up for a lot of that with the skilled and judicious use of orbital strikes, as the Space Marines do, and a desire to avoid that is probably why Navy-Guard cooperation is often pretty poor with the exception of aerospace aviation. Individual captains probably do learn to be highly effective at supporting ground strikes with orbital fires, like the frigate captain in Gaunt's Ghosts, and whole battlegroups may relearn the skills in major Crusades like the Macharian Crusade. This is the kind of thing which probably gives the Administratum and Inquisition sleepless nights, because it means individual captains become even more capable of conquering small worlds by themselves, aside from simply holding them to ransom with their guns.)