In Turin's tale his sword contains some of the spirit of the Dark Elf Eol, and
in the end the sword even talks to Turin. The Ring obviously contains a
good deal of the spirit of Sauron. In Unfinished Tales Tolkien writes of
one of the wild men or Woses who makes a statue or Pukel-man to watch over a
friend's house when he is away. During his absence the house starts on
fire, and the statue comes to life and stomps it out. Later, when the
wild man returns, his feet are severely burned.
My point is that Tolkien had a theory that the maker puts some of his spirit
into that which he makes. Now let's combine that with the fact that
Glorfindel's spirit literally glows in the presence of the Black Riders.
Glorfindel is a High Elf, who has been to the Undying Lands. If
Glorfindel made a sword -- and as a Noldor, I would be surprised if he had not
make a sword -- wouldn't it also be likely to glow in the presence of Evil?
As for why other swords don't glow, we don't see other swords made by High
Elves. Narsil was made by a dwarf, and remade as Anduril by Elves or
Half-elves. So Narsil and Anduril work a little differently from Orcrist,
Glamdring, and Sting. Nevertheless, Anduril does shine like a flame, the
Flame of the West, and presumably does have a spirit of its own. It seems
to shine in the darkness at Helm's Deep, for example, when the orcs had doused
their torches.
By the way, as a purely historical matter, swords considered magical were often
accidental carbonized steel, as opposed to iron, and therefore were not only
harder and sharper than iron swords but also held their polish better and shone
in battle.
Note the anachronism in this passage -- Bilbo felt for a match. Useable
matches were not perfected until the 19th century! (See the link
below.)
“I dislike Allegory - the conscious and intentional allegory - yet any attempt to explain the purport of myth or fairytale must use allegorical language. (And, of course, the more 'life' a story has the more readily will it be susceptible of allegorical interpretations: while the better a deliberate allegory is made the more nearly will it be acceptable just as a story.)” (From Tolkien Letter # 131.)