The Curmudgeonly Clerk has this interesting post on the law of swearing to tell the truth. Tim Sandefur adds to it with this interesting post about the "No Religious Test" clause of the Constitution.
I had a witness in federal court in a civil case who told me, before he told me anything else, that he would not swear an oath, as it was against his religion. No problem, I said, what the clerk asks is if you will "swear or affirm," etc. "Affirm" he said, thinking it over, "I can do that." When the time came, he replied to the clerk, "Yes, I will tell the truth." I waited, but no one questioned this response. There's nothing like having a witness come through on the hard questions.