This habit comes from the medieval times. Think of the right hand as the "criminal record" of these days. If one was convicted for an odious crime, the Inquisition would mark his right hand with a letter. These letters were made from cast iron. They were placed in fire until to become red-hot. Similar like we mark horses today, the hand of the convicted person was marked with a letter according to his crime. "A" for atheism, "B" for blasphemy, "W" for witchcraft and so on. So, when taking an oath, they use to raise their right hand to show that they're "clean"