In hindsight it seems to have led to more problems in stead of less. Plus all the violence seems to have been more severe after independence than before.
-edit The reason I've asked this question by the way is that I am travelling through India at the moment and all religious groups, by the looks of it, have a more or less cordial relationship with each other.
India was really the first of the modern decolonization independence movements to reach success. The real template for this was Wilsonian "self-determination" in the wake of WWI, which was based on a lot of assumptions that come out of European and Near Eastern nationalist movements. The most important of these was that there were such things as nations, they were natural and enduring, and that was the relevant "self" that should be determining. Over the course of the 19th century, starting with Bengali clerks according to Sudipta Kaviraj who were assigned all over the subcontinent, there developed an "Indian" national identity not tied language or caste or (in theory at least) religon. The Independence movement used this "historically available identity" (to again use Kaviraj's language) and argued for independence for all of India as one nation. Compare this to French Indochina, for example, where the Vietnamese independence movement was for Vietnamese independence, rather than a trans-national, multilingual and Francophone Indochinese identity-based independence including Laotians, Cambodians, etc. Reading the middle chapters of Benedict Anderson, we could argue this is because Indochina segmented into separate language-based bureaucracies and educational systems, while the UK was fine using Anglophone Bengali clerks in Gujurat, Hindi clerks in Tamil Nardu, etc. and having one, primarily English, educational system.
So this explains the question you didn't ask, which is why we have one India at all, rather than separate states based on linguistic divisions which would more closely adhere to the national model of Europe. Jinnah, head of the Muslim League, and others argued successfully argued for the "Two-Nation Theory", namely, that Muslims and Hindus were two separate "nations" deserving and needing two separate national states. For a variety of reasons, this view ultimately won the day.
It's interesting to note that this was never, to my knowledge, repeated in the rest of decolonization--the Berbers were not allowed their own state in North Africa; nor the Kurds in the Middle East; nor the Yoruba, Ibo, and Hausa in Nigeria; nor the Chinese in Malaysia (Singapore was the result of post-colonial jockeying, rather than decolonization, and the British and the Chinese Malays didn't particularly want an independent Singapore). Instead, post-WW2 decolonization largely followed colonial lines exactly (with some slight mashing together, like Tanzania and Somalia, rather than division along non-colonial national lines).
And just to your last point, the appearance that "all religous get routs, by the looks of it, have a more or less cordial relationship with each other", three quick (edit: not so quick) points. 1) Sadly, there is a complex history of "inter-communal violence" as it's called in post-Independence India. Much of it has taken place in the last twenty years so is off-limits for discussion by this subreddit's rules, but see here (that's not a particularly good list; ignore almost everything pre-modern, definitely the stuff before the British arrive, and know that the modern list does not emphasize what a scholar working in America would likely emphasize). But even without looking at the list, let me say 10,000 or more Sikhs were killed in a 1984 pogrom, hundreds of thousands of Hindus have fled Kashmir, and more than 1,000 Muslims were killed in "rioting" in the aftermath of the destruction of what used to be known as Babri Mosque in 1992 (this issue in particular has reoccurred several times since then). Recent sociological work has also argued that persistent "inter-communal violence" has led to the creation of Muslim ghettos (see the book, Muslims in Indian Cities), which all points to the fact that communal relations, while generally calm, are not entirely without problems.
for most of history, most groups have more or less gotten along. There's no real pro- or anti-Armenian violence until the very end of the 19th century. There's only about 30, 40 years between the start of systematic violence and what is commonly called the Armenian Genocide. There is no history of Serbs and Croatians fighting each other until really WW2, and then there were decades of peace between that and the bloody Yugoslav Wars. Rogers Brubaker has done a really interesting study of Hungarians and Romanians in post-communist Transylvania (part of Romania, but historically claimed by Hungary). He found that in most of daily life ethnicity doesn't matter--but when it matters, it can matter greatly. When ethnic divisions leading to violence is a complicated question--it's not just the presence of ethnic division, and is greatly tied to groups being excluded from political and economic power. But even then, the problem is high contingent and can catch international observers by surprise (though it's often related to specific political issues--see Rwanda, Yugoslavia, etc.--this is not necessarily the case).
Muslims in India have historically voted for the Congress Party at very high rates (perhaps comparable to African-American voting for the post-New Deal Democratic Party), to the extent that some social scientists (as well as critics) talk about the "Muslim vote bank". If Pakistan, Bangladesh, and India were one country, it's unlikely electoral politics would have broken down like this (obviously we can't prove a counter-factual), as the Muslim League was probably the largest non-Congress party in pre-Partition India. Rather than voting Congress, we can easily imagine a very different undivided India were Muslims primarily voted for separate Muslim parties, which would perhaps lead to Indian politics being much more polarized along communal lines. Jack Snyder's From Voting to Violence is a good discussion of how democratization in ethnically divided countries can increase violence.
This is a very good, but very complicated question, and to be honest, I feel like I've only scratched the surface and given the start of an answer, rather than a full answer. I wish I could recommend a good book for you, but I mainly look at post-Partion India, and even here, that's just a side interest for me so I know some of the political science literature, but not much of the history.