Some people translate this as, "You shall not take the name of God, your God, in vain, for God will not absolve anyone who takes His name in vain."
(1) לשוא IN VAIN — for no valid reason, idly. What is a שבועת שוא, an oath taken for no valid reason? If one takes an oath declaring something, the nature of which is evident, to be different from what it is: e. g., swearing about a stone pillar that it is of gold (Shevuot 29a).
כוונת רש"י, שלא תאמר שלשון התרגום למגנא שהיא חנם, ר"ל שאין בו הנאה, אבל אם היה לו בו הנאה יהא מותר, לכן פירש להבל, דעיקר הכוונה להבל שאין בו ממש, זה נקרא חנם. [גור אריה]. ועיין בשבועות (כט.) שם תמצא ד' מיני שבועות שוא:
Siftei Chachamim:
Rashi is commenting on the Onkelos, who translates the word "למגנא" to mean "not deriving any benefit". This would imply that if you do derive benefit from it, you would be allow to use Hashem's name. That is why Rashi explains that this is talking about meaningless oaths.
Explains that this commandment is using Hashem’s name when swearing an oath. Also explains where the word תשא comes from
Rashbam explains that this commandment, and the next two commandments are about honoring Hashem
מאחר שלא ראית שום תמונה אין יכולת לישבע רק בשמו ואעפ״כ
Chizkuni:
Since you have never seen God, you are not allowed to swear by him.
Midrash: Hashem is saying not to misuse His Holy Name. It can be used in serious situations, such as when Avraham was in the fire, he used it to be saved. When Moshe was at Yam Suf, he used it. Etc. If you pronounce it in vain, you will surely be punished.
Midrash:
A way you can "misuse Hashem's name" is by acting righteous when in reality you are wicked.
Kli Yakar:
This commandment corresponds with the 8th one (Don't steal) because if you steal, it will lead you to swear falsely.
Halachos of Saying God's Name in Vain:
You shouldn't say a bracha in vain or recite one unnecisarily. If you do, or you say Hashem's name in vain, you should say "Baruch Shem Kavod..."
If you start a Bracha, and get as far as "Baruch Atah Hashem," and then realize that it is the wrong bracho, you should finish it with "Lamdeini Chukecha"
Ramban holds that it is always optional to swear with Hashem's name, and in court you don't have to.