When we are trying to account for phenomena that have to do with religion, we have to be careful in our answers. To people who believe in a religion, the answers may be different than for those who do not believe. For example, a Muslim might argue that Islam spread rapidly because its teachings were clearly true and therefore touched the hearts of those who heard them. Historians, by contrast, do not accept the truth of any given religion and do not accept arguments based on the idea of a true religion.
Historians would say that one reason that Islam could spread was that it had done a very good job of uniting all of the Arabs. The Arabs had previously expended a great deal of energy fighting one another. Now, they directed the energy outward. They were also inspired and motivated by the idea that they were spreading the true faith to other people. Some historians argue that they were also helped by the fact that the Byzantines and Persians had been at war with one another. This weakened them both and left them vulnerable to the Arabs. As Arab armies conquered, they brought their new faith with them.
A second factor that helps to account for the spread of Islam is trade. Arabia was connected to many other places through trade routes. This allowed the ideas of Islam to spread rapidly to other places. This process was also bolstered by the practice of having Muslims come on pilgrimage to Mecca. There, Muslims from various areas made contact with one another and spread their trade networks even more widely.
Thus, we can say that Islam spread because of the military might of the Arabs and their widespread trading networks.