Why the Military Salutes with the Right Hand
The story everyone repeats is knights raising their visors to show a friendly face. Nobody — including the Army's own historians — actually knows if that's true.
How it actually works
The modern hand salute — right hand, palm down, touching the brim of the headgear — was in place in roughly its current form by around 1820. Several competing theories exist for the deeper origin: that the right, or "weapon," hand was historically raised across many armies as a peaceful greeting showing no weapon in hand; a Roman-antiquity theory that citizens approaching officials raised an empty right hand amid fears of assassination; and the popular medieval theory that a knight raised his visor with his right hand — the same hand that held his weapon — to identify himself to a superior. As headgear evolved through the 18th and 19th centuries, the gesture of removing a hat simplified into grasping the visor or brim, which conventionalized into the modern salute.
The knight-and-visor story is told as settled history, but it is the most popular theory, not a documented one — historians are explicit that no one actually knows which of the competing explanations, if any, is correct. Treat the visor story the way you would any good sea story: worth telling, not worth citing as fact.
Exact origin unknown and debated; the modern form was standardized by approximately 1820.