All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no doubt about the seriousness of Takfeer (ruling people to be non-Muslims) without an Islamic evidence. Such an act necessitates repentance to Allah Almighty.
Abu Hurayrah narrated that the Prophet said: "If a man says to his brother (i.e. his fellow Muslim): 'O you Kaafir (disbeliever)'; it returns back to one of them (i.e., one of them will become a disbeliever)." [Al-Bukhaari and Muslim]
Another wording reads: "… and whoever accuses a believer of kufr (disbelief), it is like killing him." [Al-Bukhaari]
For more benefit, please refer to Fataawa 323092, 188513 and 87963.
Therefore, accusing a Muslim of disbelief is a very serious matter.
Indeed, you have done well by repenting to Allah if you had committed that kind of Takfeer. You are only required to regret this and be determined not to return to this sin. There is no sin on you –Allah willing – for ruling someone as a Kaafir because of misunderstood the matter and misinterpreted it to be Kufr (disbelief).
The scholars stated that Takfeer due to a doubt and misinterpretation is something for which the person is not sinful and the threat that is mentioned in the above Hadeeth does not apply to him. Rather, the person will be rewarded if he did so out of being angry for the Sake of Allah and His Religion. The evidence about this is the story of ‘Umar when he accused Haatib of hypocrisy.
Al-Bukhaari wrote a Chapter in his Saheeh after mentioning the previous Hadeeth, which he entitled:
"Chapter: Whoever does not consider as Kaafir the person who says that because of misinterpretation or ignorance. ‘Umar said about Haatib ibn Abu Balta’h: ‘He is a hypocrite.’ Thereupon, the Prophet said: “Who knows, perhaps Allah has already looked at the Badr warriors and said, 'Do whatever you like, for I have forgiven you [as Haatib participated in the battle of Badr]." [End of quote]
Ibn Al-Qayyim mentioned this story in his book Zad Al-Ma`d and then said:
"This is evidence that if a man attributes hypocrisy or Kufr to a Muslim because of misinterpretation or because of him becoming angry for the Sake of Allah and His Messenger and His Religion, and not for his desire and interest, then he does not become a Kaafir because of it, and he is not sinful. Rather, he will be rewarded for his intention. This is contrary to the people who follow their desires and innovators, as they declare people to be Kaafir (disbelievers) and innovators just because they are not in conformity with their desires, ways and methodologies, whereas they are more deserving of this description than those whom they labelled as disbelievers and innovators." [End of quote]
Allah knows best.