The Sword is a very standard weapon in most video games. Games that take place in futuristic, medieval and present-day settings can all get away with having swords. A sword is basically a sharp weapon that the character holds in his hand and whacks stuff with. It's usually made of metal, but some games have beam swords, which are made of energy, but basically do the same thing. Many games will make up 'new' weapons that are pretty much swords with some new feature tacked on. These weapons tend to have the word 'blade' in the title.
The basic gameplay device of the sword is simple: The player has to get close to an enemy to use it which puts his/her own corporeal body in harm's way. Many, many games use swords. As a rule, it's pretty much expected for any 2D birds eye view game that uses a sword to rip off The Legend of Zelda: A Link to the Past'. It's also expected for any 3D with lock-on to rip off The Legend of Zelda: Ocarina of Time.
Different swords vary from each other in range and attack. Some weapons have incredibly short range, like Sora's Fairy Harp, making it impossible to hit enemies without getting really really close to them. These short weapons usually compensate with extra attack power or magic, or an inflated ego. Some weapons are really long, like Link's Biggoron Sword, making it easy to hit things without getting too close. These weapons often have some hidden shortcoming, like the ability to break, requiring two hands to be held or weak magic abilities (but they rarely have weak attack power.)
Swords have existed before before diesel trucks, tanks, gold jewelry, stats, and RAM, and as such, they were the first ever phallic extension. Therefore, it's more typical for male characters to use swords than female characters, who often use magic. If a man's sword represents his penis, than a woman's magic represents the fact that she's either smarter or dumber than us, and we'd never know either way.