A series of events/factors helped the spread of Islam in Hindustan.
1. Trade: The very first mosque was built in Kerala in 629 AD., during the life of the Holy Prophet by a Muslim trader from India, Cheraman Perumal Bhaskara Ravi Varma. In the early days, Arab merchants would regularly sail to the west coast of India to trade spices, perfume and gold. Through continued trade between Arab Muslims and Indians, Islam continued to spread in coastal Indian cities and towns.
2. Arab Invasion: Expansion of Islam in Sindh and South Punjab during the Umayyad Dynasty by the invasion of Arab soldiers under Mohammad Bin Qasim in 711 AD.
3. Hindus Oppression of Minorities: Oppression of Hindu minorities by the Buddhist rulers was a big factor in the spread of Islam, in the lower caste Hindus. Most cities along the Indus voluntarily came under Muslim control. According to the Muslim historians, they accepted Islam due to the good behavior, religious tolerance and justice of the Arab invaders. In some cases, oppressed Buddhist minorities reached out to the Muslim armies for protection against the harsh Hindu rajas.
4. Intermarriages: Intermarriages of the locals with the invading soldiers was a big factor in the spread of Islam in Sindh, southern Punjab and Balochistan. Majority of these marriages were forced upon the Non-Muslims girls who accepted Islam under duress.
5. Sufism: It is debatable if Sufism was a significant factor for the spread of Islam in Hindustan. I have visited some of the Durbars in Sindh and Punjab in the early sixties and witnessed the use of drugs, dancing and other illicit activities. To give the benefit of the doubt, all Durbars are not bad, I am just talking about the ones that I visited. I have seen people kissing feet and doing Sajida to the Pirs seated in highchairs, and young couples visiting the Pirs and literally asking him for a male child. If at all, the Sufis spread distorted versions of Islam, based on false Karamats and Miracles.
6. Freedom from the caste system: When Buddhism influence died out under Muslim rule, numerous tribes moved to Islam to get out of the bondage of the caste system.