Who was the greatest king in India, and what did he do that he was famous for?
The greatest King of India was Emperor Asoka. His empire included the Indian sub-continent as well as what we now call Pakistan and Afghanistan. Asoka is known as Asoka the Great because he was one of the best rulers that ever governed India. During his tenure all of India was united. The government ran smoothly. He excelled in everything that he did. His name, Ashoka means "without any sorrow" in Sanskrit. He was born in 265 B.C. and he was crowned the king of India after the death of his father. He proved that he was an excellent ruler by controlling his government and keeping the territories united.
At one point in his rule he decided to conquer Kalinga. After the battle Ashoka viewed the dead bodies, blood and terror that war caused. He vowed never to fight again and converted to Buddhism. He is credited to be the first Emperor to make a serious attempt at developing Buddhist policies and spread his belief of Buddhism all over the world.
The correct answer to your question is of some considerable debate. It should be remembered that India has long been divided North and South between Islamic and Hindu cultures. Both have long been fragmented.
My own opinion is that the greatest king of India, although not long lived 606-648 C.E), was King Harsha, also known as Harshavardhana. He came to the throne after the collapse of the Gupta dynasty at age sixteen, and subdued most of Northern India with an army of 50,000 men and 5,000 elephants. Although a Buddhist, he was tolerant of other religions, and patronized scholars liberally. His greatest asset was perhaps his personality; however local traditions and customs in Northern India were too entrenched. He was assassinated in 648 and left no heir, after which the area broke apart into warring states again.
If we are talking about Indian Born king, then it was Ashoka. But if we are talking only about a King of India, then Akbar was probably the greatest king to have ruled india.
Akbar's empire was the largest ever that also included the indian sub continent. The predominent moughal architecture in India that exists till this date is proof enough of the significane and impact of the Akbar's reign as King.