A couple of thoughtful questions first.
What do we learn or lose by following or breaking this commandment?
It’s not that the Lord will get his feelings hurt or anything like that. I think it has more to do with us taking control of ourselves. James 1:26 and all of chapter 3 are great reminders that what we say has important consequences.
“Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.”
Speaking is an action, it is doing. It can’t be undone. And with Mormon 7:7 and 3 Nephi 27:19 in mind (only the guiltless and unclean are to dwell with God eternally and receive salvation), we see that if we can not control our language, or more specifically, if we talk bad or misuse the name of the very person who is giving us eternal life, then we do not deserve to receive the gift of Atonement from him.
If everybody were to practice control over their language, beginning with not taking the Lord’s name in vain, then there would be less harsh words, less vulgarity, less mocking of things sacred. More importantly, we would have to acknowledge our dependence and relationship with God. We would show proper respect to our God and creator by not misusing his name. Our relationship with God and with others would be better if we practiced self-control of our language. Our communication would be clearer and more accurate, there would be less misunderstanding between people, and more respect for others.