It's a great tradition of space opera that no matter what high-tech weaponry abounds in the Galactic Empire, heroes still love to buckle on their swashes for a spot of romantic swordplay. Every well-appointed Galactic Empire therefore includes staircases to fight on, chandeliers to swing from, and a wide range of flashing blades. Sometimes, just to be different, these are called light sabres ...
The swordplay default is easily arranged in fantasy, where mere guns are either unavailable or forbidden by the local equivalent of physics. In The Incomplete Enchanter by L. Sprague de Camp and Fletcher Pratt, the hero thoughtfully packs a Colt .38 for his visit to Fantasyland – but finds the revolver doesn't work there, while even his stainless steel knife goes rusty. Similar difficulties feature in Robert Heinlein's Glory Road. In the Amber series by Roger Zelazny, intensive research is needed to find a gunpowder substitute (jeweller's rouge, for some reason) that functions in the magic realm.
SF scenarios need considerably more handwaving to justify lots of dashing hand-to-hand duels. The classic gimmick is to introduce force-fields, as in E.E. "Doc" Smith's Lensman series, where ray-guns hurl deadly, ravening beams of coruscating energy that nevertheless tend to bounce off force screens. So boarding parties in the Lensman universe wield mighty, two-handed space-axes, described as "a combination and sublimation of battle-axe, mace, bludgeon and lumberman's picaroon" – not unlike the basic critical tool issued to SFX reviewers.
The force-field excuse was perfected by Charles Harness in The Paradox Men (1954), where members of a Robin Hood-like Society of Thieves are equipped with personal energy fields. (Allegedly powered by the nervous system, which must be quite tiring.) This screen stops fast bullets but allows a slow-moving rapier to pass through. It's duelling time!
Frank Herbert famously swiped this shield idea to justify numerous knife fights in Dune. But Herbert couldn't resist going one better than Harness, whose Thieves can be beamed down with massive, semi-portable infra-red projectors. To make the transparent Dune shield proof against lasers, Herbert produced an idea of stunning silliness. He decreed that firing a "lasgun" at a shield causes both gun and shield to detonate in a nuclear-scale explosion. Therefore, of course, no one ever dares point their lasgun at a shield, and especially not at the huge, shield-protected installations where their worst enemies live. That, er, that wouldn't be sporting.
When Isaac Asimov based the Galactic Empire of "Foundation" on the Roman Empire, some ancient tactics didn't quite ring true in space. Siege plans, for example. In one campaign, an Imperial task force consisting of ten "ships of the line" and some minor auxiliaries manages to totally enclose and blockade a whole cluster of solar systems. No matter how much the general brags about his brilliant strategy, there seem to be some loopholes there.
An even more remarkable transfer of a classical military campaign into space appears in what I must admit is a very early Asimov story, ringingly titled "Black Friar of the Flame". This explicitly recreates the historical Greek/Persian battle of Salamis in space, and makes a great point (as it were) of the key Greek tactic of fitting rams to their triremes. Or in this utterly science-fictional version, attaching long pointy metal spikes to spaceships. "Swordfish of space! ... Against this oldest of all naval tactics ... the super-modern equipment of a space-fleet has no defense." Crikey!
Which reminds me that Piers Anthony's Mercenary, describes a asteroid-belt campaign which – for reasons known only to God and the author – echoes the 1241 Mongol invasion of Hungary so faithfully as to neglect the fact that space has three dimensions. Battle tactics in the crowded Belt are heavily constrained by the need for "armies" of spaceships to "ford" various "rivers" of spaceborne sand. These pseudo-rivers are given codenames like Danube and Sajo to heighten the general unbelievability, and ... oh, I can't go on. Anthony must have had tons of research left over from his interstellar-Mongol-hordes novel Steppe.
But let me tell you about Forbidden Planet, not the film but a memorably dire hack novel by "John E. Muller". This features a battleground of 64 planets between which talented aliens can teleport in different ways – straight, diagonally or skewed – until at last the human pawns invent a special notation for recording events: "P-K4 ..."
David Langford is writing a space-opera trilogy based on the strategy of "Scissors, Paper and Stone".