Unlike many of the Spanish conquistadors, almost every British adventurer to India aimed to enjoy his booty in his native land. - JR Ward (The Economic History Review)The oligarchy involves India in wars, in order to find employment for their younger sons; the moneyocracy consigns it to the highest bidder; and a subordinate Bureaucracy paralyse its administration and perpetuate its abuses as the vital condition of their own perpetuation. - Karl Marx (1853)
Timing of Colonization:
The industrial revolution is a phenomenon of late 1700s (1760-1820) and one of the many factors that led to this is the colonization of India  in the decade before the start of the revolution (1750s). India became a huge source of cotton, indigo and also became a huge market for the products of the industrial revolution. India also provided a massive tax base thus completing the holy trinity of capitalism - raw materials, capital and markets. There is a very interesting op-ed by Karl Marx on this in the New York Tribune:
[As a side note, Mahatma Gandhi later attacked on all the 3 fronts - by refusing to pay taxes through civil disobedience, by blocking indigo plantation around non-cooperation movement and by refusing to buy foreign clothes through Khadi movement. Once you block capital, raw material and markets, empires fall apart.]
In short, India was colonized before it even had a chance to industrialize & it was one of the primary inputs of industrialization. Under the colonial rule, a series of massive mishaps happened that further pushed India away from having an industrial revolution. When you are ruled by a Corporation [not figuratively, but literally] from another country this is what you get - developing you is not their priority.
The one major king who was independent enough to have a chance to industrialize was Mysore's Tipu Sultan who rapidly industrialized his region in the late 1700s. However, he was eventually defeated by the East India Company and a lot of that progress was impeded. Still, Mysore retained its edge due to that brief window of growth [India tech capital, Bangalore, is a part of that erstwhile Mysore kingdom].Rockets of Tipu Sultan (late 1700s AD)
Nature of colonizationIn most big colonies - US, Canada, Australia, Argentina, Mexico, South Africa, Brazil... the invading power settled. The Spanish men who settled in Argentina had little intention of getting back. However, the British who came to India never saw it as their home and always a few years away from return back to England.
This was both good and bad to India. It was good that unlike other colonies India maintained its culture and escaped mass extermination of natives. But, the flip side is that the invading power had little incentives to industrialize. Since it was not their home, but a few year assignment, they were content in leaving the industries in a primitive state.
Civil wars & domestic upheavalsAt a time when Europe was going through the massive explosion of scientific ideas, India and China were through a massive domestic upheaval through civil wars. In the early 1700s, the Mughal empire of collapsing and multiple suitors tried to be its successors. Eventually, the East India Company won the process of succession. China was again going through a massive domestic upheaval as the Manchu rulers were trying to consolidate what is left of the Ming empire. When you are fighting a massive domestic trouble, innovation and economy takes a backseat.
Dominating the shipping routesEngland had a iron-clad control over India's shipping routes. Industrial revolution requires freer access to markets. However, Indian merchants were denied access to that. When Indians tried buying their own ships, they were arrested on false charges and sentenced like the story of .
Availability of Coal:One of the primary engines of Industrial Revolution was coal. It powered the steam engines and steel production. In 18th century, England was the only main producer. Coal was not discovered in most of the rest of the world. So much so that:
In 1700, five-sixths of the world's coal was mined in Britain.When you don't have a critical input for the industrial revolution, you are always falling behind. It was not very practical to haul coal to long distances with the infrastructure of the 1700s.
Impetus for Industrial RevolutionAt around the 15th century, Europe experienced a massive population drop due to the plague and various wars it was fighting. This caused a huge change in the society - damaging the feudal system [many landlords no longer had poor peasants to serve them] and the religion. This eventually setup the path to mechanization -> colonization and eventually an agricultural revolution of early 1700s.
The agricultural revolution freed up trained labor that was then used by the industrial revolution. The key thing was timing here. If the agricultural revolution happened without England being to colonize the rest of the world, the unemployment would have crushed them. In any case, the industrial revolution was fed by the agricultural revolution that was itself fed by a massive population drop.