Are All Sins Forgiven after Converting to Islam?
Question

A brother of ours has recently become Muslim. During his days of Jahiliyyah (ignorance – i.e., before he became Muslim), he earned a lot of money by dealing in drugs. He brought this money with him and opened a big bookstore and got married using this money. Recently he has been told that it is not permissible for him to give this money to charity, because Allah is Good and only accepts that which is good. Our question is, what should he do with this money, and how sound is what he has been told?.
Praise be to Allah.We thank Allah Who has guided your friend to Islam. We ask Allah to make him steadfast and to guide him to that which is good for him in this world and in the Hereafter. 
By His Grace and Mercy, Allah has made embracing Islam a cause to erase the sins that were committed before it. When a disbeliever becomes Muslim, Allah forgives all that he did when he was a non-Muslim, and he becomes cleansed of sin. 
Muslim (121) narrated that `Amr ibn Al-`As (may Allah be pleased with him) said: When Allah put Islam in my heart, I came to the Prophet (peace and blessings of Allah be upon him) and said: “Give me your right hand so that I may swear allegiance to you.” He held out his hand and I withdrew my hand. He said, “What is the matter, O `Amr?” I said, “I want to stipulate a condition.” He said, “What do you want to stipulate?” I said, “That I will be forgiven.” He said, “Do you not know that Islam destroys that which came before it?” 
“Islam destroys that which came before it” means that it erases it and wipes it out. (Stated by An-Nawawi in Sharh Muslim) 
Shaykh Ibn `Uthaymin (may Allah have mercy on him) was asked a similar question, about someone who earned money by dealing in drugs before he became Muslim. He replied: 
“We say to this brother whom Allah has blessed with Islam after he had earned unlawful wealth: be of good cheer, for this wealth is permissible for him and there is no sin on him in it, whether he keeps it or gives it in charity, or uses it to get married, because Allah says in His Holy Book (interpretation of the meaning): 
“Say to those who have disbelieved, if they cease (from disbelief), their past will be forgiven. But if they return (thereto), then the examples of those (punished) before them have already preceded (as a warning)” [Al-Anfal 8:38]
This means all that has passed, in general terms, is forgiven. But any money that was taken by force from its owner must be returned to him. But money that was earned by agreements between people, even if it is unlawful, like that which is earned through Riba (interest)or by selling drugs, etc. it is permissible for him when he becomes Muslim because Allah says, “Say to those who have disbelieved, if they cease (from disbelief), their past will be forgiven”. And the Prophet (peace and blessings of Allah be upon him) said to `Amr ibn Al-`As when he became Muslim: “Do you not know that Islam destroys that which came before it?” 
Many of the non-Muslims became Muslim after they had killed Muslims, but they were not punished for what they had done. So tell this brother that his wealth is permissible and there is no sin in it; he may give it in charity and use it to get married. As for what he has been told about it not being permissible for him to give it in charity, there is no basis for that.” (Liqa’at Al-Bab Al-Maftuh, /373-374)
For more details, please see the following answers: 14246 , 219679 , 34171 , 372709 , 264534 , 114 , 11819 , and 2585 .
And Allah knows best.