"You shall not take the name of the Lord your God in vain, for the Lord will not hold guiltless anyone who takes his name in vain" (Ex. 20:7 NET Bible).
The Ten Commandments include, as the third commandment, a prohibition against taking the name of the Lord in vain. Most often I've heard this applied as a law against swearing by saying, "Oh my God" or "Jesus Christ!"
The Name of the Lord
The first misunderstanding about this commandment is about the name of the Lord. Ironically, this misunderstanding arose because the Jewish people were trying to obey this commandment.
The name of the Lord is Yahweh (or YHWH or יהוה), not "God" or "the Lord." But, because the Jewish people wanted to be careful to never take the name of Yahweh in vain, they avoided saying his name at all. When reading the Hebrew scriptures (even today) Jewish people don't pronounce the name of Yahweh but instead substitute the word for "lord" which is Adonai. As that substitution continued it affected the Jewish and Christian people of the first century so that the Greek word for "lord" became synonymous with the Hebrew word for "lord" and was used to proclaim that Jesus is Yahweh (i.e. Jesus is Lord).
Most modern English translations of the Old Testament will indicate where the word Yahweh is being translated as "lord" by using all capital letters (i.e. LORD). But the New Testament writers were so accustomed to knowing the difference between lord and LORD through context that they didn't differentiate the words in any way.
The name of the God of Abraham, Isaac, and Jacob, and the Father of Jesus is Yahweh. It is the name of Yahweh that should not be taken in vain.
Taking the Name of Yahweh
In the ancient world a name held much more significance than modern people tend to give it. The name of a god or a king was tied strongly to their authority and rule, but also to the allegiance of the person swearing by that name. The Hebrew people were commanded to swear oaths only by the name of Yahweh (Deut. 6:11).
To take the name of Yahweh, in vain or otherwise, is to claim allegiance to Yahweh and alignment with his teaching. So a vain oath could be either one without allegiance to the oath or to Yahweh. It would have been taking the name of Yahweh in vain to swear an oath by his name while having no intent to keep the oath, it would have also been taking the name of Yahweh in vain to swear an oath that contradicted the values of Yahweh.
For the ancient world there was a dearth of hard evidence. Most information was passed along orally and so trust had to be rooted in the person. If someone was unknown or the trust couldn't be established by the person alone, they could swear an oath upon something with unquestioned trustworthiness. For the Hebrew people that was Yahweh.
The Purpose of Oaths
All throughout Jesus' Sermon on the Mount (Matt. 5-7) he contrasts the old law with his new teaching. "You have heard it was said... but I say to you..."
This contrast isn't to undermine the law, but to show how the law was meant to shape the hearts of people. Rules didn't produce a good life, only being good people could do that. Jesus wanted to show how loving God and loving neighbors is an extension of the old law. He wanted to show the purpose of the law in how people were to be changed.
So, when Jesus taught about oaths, he was addressing the purpose of not taking the name of Yahweh in vain.
33 “Again, you have heard that it was said to an older generation, ‘Do not break an oath, but fulfill your vows to the Lord.’ 34 But I say to you, do not take oaths at all—not by heaven, because it is the throne of God, 35 not by earth, because it is his footstool, and not by Jerusalem, because it is the city of the great King. 36 Do not take an oath by your head, because you are not able to make one hair white or black. 37 Let your word be ‘Yes, yes’ or ‘No, no.’ More than this is from the evil one (Matt. 5:33-37 NET Bible).Oaths aren't what prove our trustworthiness, being trustworthy is. Swearing by Yahweh isn't the guarantee of our oath, keeping our promise is. Oaths were meant to be an external sign of an internal reality: that Yahweh's people do what they say they'll do and they take responsibility for their actions.
Dragging Yahweh's Name through the Mud
The heart of the bible is love: loving God and loving our neighbors. God's identity is love. Yet many people who wear the name of Christ are hateful. They hate people of different religions. They hate members of the LGBT community. They hate people with different political views. They hate people from different countries or ethnicities. And they do all of that under the name of Christ who is love.
Far more than a prohibition against saying "oh my god," the third commandment teaches us to respect the power of Yahweh's name and the meaning of that name as a symbol of love, justice, and peace. Jesus teaches us that we don't get to co-opt Yahweh's identity by using his name, we have to show the love, justice, and peace of Yahweh in our actions as well as with our words.
Tying the names of Yahweh and Christ to misogyny, to racism, to xenophobia, and to homophobia takes their names in vain. Hiding personal hatred behind the names of Yahweh and Christ avoids the personal responsibility and transformation that Jesus called his followers to.
If you choose to identify by the name of Christ, you are taking his reputation and adding your actions to it. Jesus' reputation was of love, of acceptance, of welcoming the sinners and tax collectors and prostitutes and lepers. Jesus was known for his love, for his justice, and for his peace. If you wear his name you should be known for the same things. If you don't want to be known for love, then don't wear the name of Christ. If you don't want to stand up for justice, then don't take the name of Yahweh. If you cannot stop hating and being unjust, at least do so in your own name and stop taking the name of Yahweh in vain.