1- The oath is an obligation if we to use God's name:
16:91 Fulfill the covenant of Allah when ye have covenanted, and break not your oaths after the asseveration of them, and after ye have made Allah surety over you. Lo! Allah knoweth what ye do.وَأَوْفُواْ بِعَهْدِ اللّهِ إِذَا عَاهَدتُّمْ وَلاَ تَنقُضُواْ الأَيْمَانَ بَعْدَ تَوْكِيدِهَا وَقَدْ جَعَلْتُمُ اللّهَ عَلَيْكُمْ كَفِيلاً إِنَّ اللّهَ يَعْلَمُ مَا تَفْعَلُونَ (16:91)
2- God warns us not to use our oath to deceive people: the punishment of that is grave.
16:94 Make not your oaths a deceit between you, lest a foot should slip after being firmly planted and ye should taste evil forasmuch as ye debarred (men) from the way of Allah, and yours should be an awful doom. وَلاَ تَتَّخِذُواْ أَيْمَانَكُمْ دَخَلاً بَيْنَكُمْ فَتَزِلَّ قَدَمٌ بَعْدَ ثُبُوتِهَا وَتَذُوقُواْ الْسُّوءَ بِمَا صَدَدتُّمْ عَن سَبِيلِ اللّهِ وَلَكُمْ عَذَابٌ عَظِيمٌ (16:94)
3- God more explicitly explain this punishment of breaking the oath: This is particularly in breaking our faith and turning away from Islam.
3:77 Lo! those who purchase a small gain at the cost of Allah's covenant and their oaths, they have no portion in the Hereafter. Allah will neither speak to them nor look upon them on the Day of Resurrection, nor will He make them grow. Theirs will be a painful doom. إِنَّ الَّذِينَ يَشْتَرُونَ بِعَهْدِ اللّهِ وَأَيْمَانِهِمْ ثَمَنًا قَلِيلاً أُوْلَـئِكَ لاَ خَلاَقَ لَهُمْ فِي الآخِرَةِ وَلاَ يُكَلِّمُهُمُ اللّهُ وَلاَ يَنظُرُ إِلَيْهِمْ يَوْمَ الْقِيَامَةِ وَلاَ يُزَكِّيهِمْ وَلَهُمْ عَذَابٌ أَلِيمٌ (3:77)
4- Breaking the Oath take away our good deeds: It is particularly so in affidavit between strong and weak countries.
16:92 And be not like a woman who breaks into untwisted strands the yarn which she has spun, after it has become strong. Nor take your oaths to practise deception between yourselves, lest one party should be more numerous than another: for Allah will test you by this; and on the Day of Judgment He will certainly make clear to you (the truth of) that wherein ye disagree. - وَلاَ تَكُونُواْ كَالَّتِي نَقَضَتْ غَزْلَهَا مِن بَعْدِ قُوَّةٍ أَنكَاثًا تَتَّخِذُونَ أَيْمَانَكُمْ دَخَلاً بَيْنَكُمْ أَن تَكُونَ أُمَّةٌ هِيَ أَرْبَى مِنْ أُمَّةٍ إِنَّمَا يَبْلُوكُمُ اللّهُ بِهِ وَلَيُبَيِّنَنَّ لَكُمْ يَوْمَ الْقِيَامَةِ مَا كُنتُمْ فِيهِ تَخْتَلِفُونَ (16:92)5- God allow us to break the oath in rare occasions: this is if we to find out the righteous thing is to do so and not what we took oath on. Understandably you do not do that with treaties signed between nations but mostly in personal matters.
2:224 And make not Allah's (name) an excuse in your oaths against doing good, or acting rightly, or making peace between persons; for Allah is One Who heareth and knoweth all things. -
وَلاَ تَجْعَلُواْ اللّهَ عُرْضَةً لِّأَيْمَانِكُمْ أَن تَبَرُّواْ وَتَتَّقُواْ وَتُصْلِحُواْ بَيْنَ النَّاسِ وَاللّهُ سَمِيعٌ عَلِيمٌ (2:224)
Lit., "do not make God, because of your oaths...", etc. As can be seen from verse 226, this injunction refers primarily to oaths relating to divorce but is, nevertheless, general in its import. Thus, there are several authentic Traditions to the effect that the Prophet Muhammad said: "If anyone takes a solemn oath [that he would do or refrain from doing such-and such a thing], and thereupon realizes that something else would be a more righteous course, then let him do that which is more righteous, and let him break his oath and then atone for it" (Bukhari and Muslim; and other variants of the same Tradition in other compilations). As regards the method of atonement, see 5:89.(Quran Ref: 2:224 )
6- God will not punish us for the oath that is not intentional: some people particularly the Arab in time of Muhammad had the habit of swearing in God even non-intentional. God for his fairness will ask us about the intentional. It is more prudent to avoid swearing except for the rare occasions when swearing will be important like in courts.
2:225 Allah will not take you to task for that which is unintentional in your oaths. But He will take you to task for that which your hearts have garnered. Allah is Forgiving, Clement. لاَّ يُؤَاخِذُكُمُ
اللّهُ بِاللَّغْوِ فِيَ أَيْمَانِكُمْ وَلَكِن يُؤَاخِذُكُم بِمَا كَسَبَتْ قُلُوبُكُمْ وَاللّهُ غَفُورٌ حَلِيمٌ
7- For the oath that is intentional and we break he gave us the way out:
5:89 Allah will not take you to task for that which is unintentional in your oaths, but He will take you to task for the oaths which ye swear in earnest. The expiation thereof is the feeding of ten of the needy with the average of that wherewith ye feed your own folk, or the clothing of them, or the liberation of a slave, and for him who findeth not (the wherewithal to do so) then a three day fast. This is the expiation of your oaths when ye have sworn; and keep your oaths. Thus Allah expoundeth unto you His revelations in order that ye may give thanks. لاَ يُؤَاخِذُكُمُ اللّهُ بِاللَّغْوِ فِي أَيْمَانِكُمْ وَلَـكِن يُؤَاخِذُكُم بِمَا عَقَّدتُّمُ الأَيْمَانَ فَكَفَّارَتُهُ إِطْعَامُ عَشَرَةِ مَسَاكِينَ مِنْ أَوْسَطِ مَا تُطْعِمُونَ أَهْلِيكُمْ أَوْ كِسْوَتُهُمْ أَوْ تَحْرِيرُ رَقَبَةٍ فَمَن لَّمْ يَجِدْ فَصِيَامُ ثَلاَثَةِ أَيَّامٍ ذَلِكَ كَفَّارَةُ أَيْمَانِكُمْ إِذَا حَلَفْتُمْ وَاحْفَظُواْ أَيْمَانَكُمْ كَذَلِكَ يُبَيِّنُ اللّهُ لَكُمْ آيَاتِهِ لَعَلَّكُمْ تَشْكُرُونَ (5:89)