Hadith 1719
'Aishah (May Allah be pleased with her) reported:
وعن عائشة رضي الله عنها قالت: أنزلت هذه الآية: {لا يؤاخذكم الله باللغو في أيمانكم} في قول الرجل: لا والله، وبلى والله. ((رواه البخاري)).
The Ayah: "Allah will not punish you for what is unintentional in your oaths..." was revealed in respect of those persons who are in the habit of repeating: 'No, by Allah'; and 'Yes, by Allah.' [Al- Bukhari].
In plain words
The verse that Allah will not punish you for unintentional oaths is explained as referring to people who habitually say 'No, by Allah' and 'Yes, by Allah' without meaning to swear. Allah weighs intention, not slips of the tongue.
Reference : Riyad as-Salihin 1719 In-book reference : Book 17, Hadith 209