In 1764 India was ripe for the picking.
The Mughal Empire, which had ruled much of the region for the past two centuries, had shattered. The various smaller states that arose in its place were relatively weak, both militarily and economically. Recent advances in artillery and infantry techniques had given Europeans a significant edge on the battlefield, as had been demonstrated only a few years earlier when the French dealt a number of crushing defeats to the Nawab of Carnatic.
The British East India Company observed all this with a curious eye, and after evicting the French from the region, had a mind to take a more active role in the subcontinent (having previously been largely restricted to trade concessions).
The spark for outright conquest came from India, when the Jagat Seth bankers of Bengal, being fed up with the cruelty of the Nawab, invited (and financed) the British invasion. Their reasoning, not unfounded, being that the British were the least-worst option for providing a stable, business-friendly environment.
In response to British incursion came a triple alliance, described as the, “last gasp” of the Mughals, which included the Nawab of Bengal, Nawab of Awadh, and Mughal remnants under Shah Alam. The conflict that followed was a close-run affair, but the British ultimately emerged victorious and annexed the Bengal region (then the richest province in India).
Over the next 100 years the British East India Company would conquer the remaining states across India, often doing so by exploiting rivalries between adversarial Indian rulers. While local polities quickly closed the military gap and acquitted themselves well on the battlefield (the Mysore Sultans and Sikh Empire earning particular praise from the British), the economic gap only widened, and ultimately, guaranteed the Company’s success.
British rule would last until 1947, only being seriously threatened in the 1857 rebellion, during which North-Indians attempted to oust the British and reinstall the Mughals under, “Emperor” Bahdur Shah Zafur (who was only a ceremonial figurehead at this point).
Link to full post w/ additional reading/sources.