Antiquarian John Aubrey wrote in his 1696 book Miscellanies that the reasoning was that Mars (the Roman god of war and associated with the metal iron) was the enemy of Saturn (ruler of the witches).
A less pagan interpretation of the superstition is that a horseshoe held on its side makes a "C" for Christ. » Continue reading
Read more on Tid Bits