Unlike India, China has historically been relatively isolated from other civilizations of comparable prestige and power due to its geography. Therefore, like ancient Egypt, it came to think of itself as the world’s central civilization, whose mission was to expand its scope and impose its influence and culture on the surrounding peoples. India has two long coastal lines, while China has one. This key geographic difference exposed India to far more extensive and diverse economic, social, and cultural contacts than China.
In China, the state has traditionally played a much larger role in regulating the economy than in India or most other countries. In part, this organizing role of the government was derived from the need to regulate the course of the rivers, especially the unpredictable Yellow River, in the vicinity of which the earliest Chinese states were formed. To do this, the government had to mobilize an extensive workforce to carry out massive earthworks. The Chinese also developed a much more extensive internal communications network, including a system of internal waterways, the running and maintenance of which required central supervision; these networks proved vital for the functioning of the Chinese economy.
The constant threat of nomadic invasions from the north and the west made the Chinese people and their government think about and organize a common defense in much more systematic fashion than was the case in India. India enjoyed protection from the high mountain ranges, which provided an effective barrier in the north, and from deserts of Eastern Iran, which made it difficult for anyone to attack India from the west.
Unlike India, China had no major racial tensions. Ethnic and language differences were also much more prominent in India, with its hundreds of languages, than in China. Likewise, the Chinese religions of Daoism, Buddhism, and Confucianism did not divide people into ritually distinct groups (castes or jatis) or categories (varnas) with specific ritual obligations or enforced separation. The Chinese political order was more paternalistic; it modeled itself on the hierarchical order of an extended family or clan in which the younger members enjoyed less authority and privilege but were not qualitatively distinct from older members, whose authority depended solely on their position and experience.
The Chinese educational system, especially in its Confucian and Buddhist forms, was not ritually exclusive, unlike the Vedic system. Instead, education in China was relatively open to most people, including lower-class boys. The Chinese examination system was elitist and highly competitive, but it stressed individual abilities rather than the origins or social status of the student. In this way, Chinese high culture provided venues for social mobility and exercised an integrative influence on Chinese society.
I would agree with the above post about geography favoring an eventually unified Chinese state and people, as China was and is the epicenter of Asian economies and trade with the rest of the world. It has always had abundant natural resources and coastal and river transportation routes. The Indian subcontinent, on the other hand, is limited by its location, both protected and limited by the Himalayas, and a diversity of peoples and religions that have made unity difficult even in the present day.
I'm a Jared Diamond disciple, you could say. I think it's geographical. I think that China became united because its geography made it easy for a given political power to project force across the whole region. The geography also helped create a similar culture (as per jpope's point) in China. There was so much contact between the various parts of China (because of few geographical barriers and the two major river systems) that cultural innovations spread and became common to all of China.
So, I would argue that China's geography made it easier for a centralized system to evolve there than in India with its much more segmented geography.
I think it’s simply a matter of differing cultures. China has for some time now enjoyed a robust sense of nationalism, and this has led to a strong centralized government; combine this with China’s history of socialism and its one party system, which became notorious for slicing dissenters. India, on the other hand is more complex, has more diverging cultural and ethnic groups, and has a history of a weak central government, vulnerable to corruption. Now India is seeking to become an economic powerhouse, and strong democracy, but corruption and fragmentation are still present. This contrast is most evident in the infrastructure of each nation, despite their similar economic status and large populations. China enjoys an unrivaled clean and efficient system, where as India is sometimes describes as "in ruins".
China was able to unite due to strong leadership which was not affected by religious sentiments. Strong leaders in India were either Hindu, Islamic, or in some instances, Buddhist. This religious fragmentation led to political fragmentation.
China was first united under Qin Shihuangdi, who proclaimed himself the first Emperor of China. By standardizing Chinese writing and a well developed system of canals and roadways, the dynasties that succeeded the Qin, such as the Han, Song, and Tang, remained united.
India was not so fortunate. The Mauryan and Gupta dynasties managed to subdue and control large portions of the Indian sub continent; but neither dynasty was long lived as was the case in China. The closest was probably Ashoka, but his empire crumbled shortly after his death. A number of war lords ruled parts of the country thereafter. With Islamic invasions, the sub-continent was more divided than ever with the north being Islamic and the South Hindu. Buddhism, though born in India, was practically eradicated.