Allah will not call you to account for thoughtlessness in your oaths, but for the intention in your hearts; and He is Oft-forgiving, Most Forbearing.
This means that a person will not be held accountable for those of his oaths that are uttered thoughtlessly and without any premeditated intention. They are just words of mouth without any serious intent behind them. They are not the result of any greed or expediency, but are occasionally blurted out in the course of a conversation. Allāh will, however, take account of those deliberate and premeditated oaths in His name that are intended to hurt others. Vain oaths will not be held against those who utter them, as Allāh is most Forgiving and most Forbearing. By describing these oaths as vain, clearly suggests that serious and upright people must also avoid them. One of the prominent characteristics of sober and decent people specifically mentioned in the Qur’ān is that they avoid anything frivolous.
Islahi, Amin Ahsan. Pondering Over The Qur’an: Surah al-Fatiha and Surah al-Baqarah (Kindle Locations 13056-13062). Islamic Book Trust. Kindle Edition.