Thawban, may Allah be pleased with him, reported that the Messenger of Allah, may Allah's peace and blessing be upon him, said:
"Two groups of my Ummah Allah has protected from the hellfire: a group that will conquer India and a group that will be with 'Isa ibn Maryam, may peace be upon him."
Na'im ibn Hammad in Al-Fitan reports that Abu Hurayrah, radiallahu 'anhu, said that the Messenger of Allah, sallallahu 'alayhi wa sallam, mentioned India and said:
"A group of you will conquer India, Allah will open for them [India] until they come with its kings chained - Allah having forgiven their sins - when they return back [from India], they will find Ibn Maryam in Syria."
While Abu Hurayrah said:
"The Messenger of Allah, sallallahu 'alayhi wa sallam, promised us [the Muslims] the conquest of India. If I was to come across that I will spend my soul and wealth. If I am killed then I am among the best of martyrs. And if I return then I am Abu Hurayrah the freed."
In another narration reported by Ahmad, Abu Hurayrah says:
"I was told by my khalil (beloved), the truthful and believed in, the Messenger of Allah, sallallahu 'alayhi wa sallam, that there will be in this 'ummah an expedition sent to Sind and Hind (India) ... " The rest of the narration is the same but it has the following addition, "... then I will be released from the Hellfire."
At-Tuwayjri remarks this addition explains what is meant by "the freed" above.
Ibn Kathir remarks in Al-Bidayah wa'n-Nihayah:
"The Muslims invaded India during the days of Mu'awiyah in the year 44H and [great] events transpired then. And [likewise] the mighty and magnificent King Mahmud ibn Subuktikin, the ruler of Ghaznah, invaded the lands of India at the turn of the fifth century. He entered India and killed, took captive, [and] enslaved [many]. He took [much] booty. He entered As-Sumanat and destroyed the great Buddah which they worship and he stripped it of its jewellery. He then returned [to Ghaznah] safe, [divinely] aided, and victorious."
As-Sumanat is a costal city where India's scholars, monks, and the idol Buddah are found.
At-Tuwayjiri remarks that Ibn Al-Athir has detailed the campaigns of Mahmud ibn Subuktikin in his book Al-Kamil fi't-Tarikh.
From At-Tuwayjiri's Ithaf al-Jama'ah, vol. 1, pp. 365-366. A short biography of At-Tuwayjiri is available here. Note from SunnahOnline.com: As-Sumanat appears to refer to Saurashtra on the western coast of Gujarat, India (and the temple referred to is the Somnath temple in Prabhas Patan near Veraval). The Buddah would actually be the Jyotirlinga located in that temple (refer to Wikipedia).