There were at least two major factors that led to the successful establishment of Islam in India.
The first, of course, was military power. It was military power that allowed Babur to invade India and to create the Mughal Dynasty. The coming of the Mughals did a great deal to install Islam as a major religion in India. Many Indians probably turned to Islam as a way of gaining access to the power and wealth of the Mughals.
However, conditions in India helped Islam to take hold as well. Notable here was the intensely hierarchical nature of Hindu society. Islam is a very egalitarian religion and this aspect of it would have appealed greatly to those Indians who were on the bottom of the social ladder in the Hindu system.
Thus, both Mughal military might and Muslim egalitarianism helped lead to the establishment of Islam in India.