You shall not take the name of the LORD your God in vain, for the LORD will not leave him unpunished who takes His name in vain. (Exodus 20:7)
We should fear and love God that we may not curse, swear, use witchcraft, lie, or deceive by His name, but call upon it in every trouble, pray, praise, and give thanks. (Martin Luther)
In this explanation, Luther begins two patterns that are found in the rest of his explanations of the commandments. First, he frames our reason for obedience as our love and fear (awed respect) for God, not for earning/maintaining salvation. Francis Schaeffer echoes this thought in his True Spirituality, calling it the “Law of Love”. The second pattern is that Luther identifies both negative duties (do not's) and positive duties (do's). This takes believers from formal outward obedience to re-forming the believer's manner of life and character.
In the most narrow sense, this commandment forbids invoking God's Name as the authority to affirm something for the purpose of deception or to promise something one will not do (whether as deception or from carelessness). Luther took this further with examples of ways in which God's name could be used deceptively, abusively or trivialized. In Matthew 23:16-23, Jesus illustrated how this commandment is violated by showing how hair-splitting word games and traditions trivialized God, His authority and the value of people's words. And in Ephesians 5:4, Paul took this commandment in another direction, forbidding coarse speech.
Does that sound complicated or burdensome? It shouldn't be. As Jesus points out in Matthew 5:37, just be truthful, let your “authority” be your own character. And as Paul points out in Colossians 4:6, our speech should be gracious, seeking to help others. As for God's name, Luther got it right: seek Him in time of trouble, praise and worship Him and thank Him. If we focus on these “simple” things, we will have less opportunity for foul-mouthing or for befouling our own or God's character.