Hadith 1732
Ibn 'Umar (May Allah be pleased with them) said:
عن ابن عمر رضي الله عنهما قال: قال رسول الله صلى الله عليه وسلم : "إذا قال رجل لأخيه: يا كافر، فقد باء بها أحدهما، فإن كان كما قال وإلا رجعت عليه" ((متفق عليه)).
The Messenger of Allah (ﷺ) said, "When a person calls his brother (in Islam) a disbeliever, one of them will certainly deserve the title. If the addressee is so as he has asserted, the disbelief of the man is confirmed, but if it is untrue, then it will revert to him." [Al-Bukhari and Muslim].
In plain words
Calling a fellow Muslim a disbeliever is so serious that the charge lands on one of the two: if untrue, it returns to the accuser. A strong restraint on rash judgement of others' faith.
Reference : Riyad as-Salihin 1732 In-book reference : Book 17, Hadith 222