The legal basis of India's secularism
Secularism is India's national ideal, recognised as the only way to unify a diverse nation. Although not always practised, it is entrenched in the Indian Constitution and confirmed by a landmark Supreme Court judgement. Excerpts from both are given here.
♦ For an account of secularism in India by the eminent jurist, Michael Kirby, search for "India" here.
This is done by banning religious discrimination and by separating religion and government in a very sensitive manner. On the one hand, the Constitution keeps religious scruples from impinging on public health (25.1) and opens up Hindu institutions to all castes, even though the idea of caste is believed to be rooted in Hindu scriptures. (25.2.b) Yet, on the other, it permits Sikhs to wear the kirpan (dagger) because for all who have undergone initiation this is a religious duty (Explanation I). India’s Constitution also gives ample freedom to religious organisations (26), prevents state subsidies to any particular religion, (27) and forbids religious instruction in state schools. (28)
♦ India is “secular” (Preamble)
In 1976 an amendment to the Constitution’s Preamble was made in order to define India as a “secular” republic. As was noted in the Supreme Court judgement, “By this amendment what was implicit was made explicit.” 
♦ Prohibition of discrimination on grounds of religion (Article 15)
(1) The State shall not discriminate against any citizen on grounds only of religion, race, caste, sex, place of birth or any of them.
♦ Freedom of conscience and free profession, practice and propagation of religion (Article 25)
(1) Subject to public order, morality and health and to the other provisions of this Part, all persons are equally entitled to freedom of conscience and the right freely to profess, practise and propagate religion.
(2) Nothing in this article shall affect the operation of any existing law or prevent the State from making any law—
(a) regulating or restricting any economic, financial, political or other secular activity which may be associated with religious practice;
(b) providing for social welfare and reform or the throwing open of Hindu religious institutions of a public character to all classes and sections of Hindus.
Explanation I.—The wearing and carrying of kirpans shall be deemed to be included in the profession of the Sikh religion.
Explanation II.—In sub-clause (b) of clause (2), the reference to Hindus shall be construed as including a reference to persons professing the Sikh, Jaina or Buddhist religion, and the reference to Hindu religious institutions shall be construed accordingly.
♦ Freedom to manage religious affairs (Article 26)
Subject to public order, morality and health, every religious denomination or any section thereof shall have the right—
(a) to establish and maintain institutions for religious and charitable purposes;
(b) to manage its own affairs in matters of religion;
(c) to own and acquire movable and immovable property; and
(d) to administer such property in accordance with law.
♦ Freedom as to payment of taxes for promotion of any particular religion (Article 27)
No person shall be compelled to pay any taxes, the proceeds of which are specifically appropriated in payment of expenses for the promotion or maintenance of any particular religion or religious denomination.
♦ Freedom as to attendance at religious instruction or religious worship in state schools (Article 28)
(1) No religious instruction shall be provided in any educational institution wholly maintained out of State funds.
(2) Nothing in clause (1) shall apply to an educational institution which is administered by the State but has been established under any endowment or trust which requires that religious instruction shall be imparted in such institution.
(3) No person attending any educational institution recognised by the State or receiving aid out of State funds shall be required to take part in any religious instruction that may be imparted in such institution or to attend any religious worship that may be conducted in such institution or in any premises attached thereto unless such person or, if such person is a minor, his guardian has given his consent thereto.
India’s commitment to secularism was affirmed in a landmark ruling of the Supreme Court in 1994.  It stressed that this reflected the political aspirations of Indian leaders, beginning long before independence was achieved, as can be seen from Gandhi’s early writings below. (The -ji on the end of his name, said to be a contraction of the Sanskrit word for “teacher”, is a way of showing respect.) Here are some excerpts from this important judgement.
25. India can rightly be described as the world’s most heterogeneous society. It is a country with a rich heritage. Several races have converged in this sub-continent. They brought with them their own cultures, languages, religions and customs. These diversities threw up their own problems but the early leadership showed wisdom and sagacity in tackling them by preaching the philosophy of accommodation and tolerance. This is the message which saints and sufis spread in olden days and which Mahatma Gandhi and other leaders of modern times advocated to maintain national unity and integrity. The British policy of divide and rule, aggravated by separate electorates based on religion, had added a new dimension of mixing religion with politics which had to be countered and which could be countered only if the people realised the need for national unity and integrity. It was with the weapons of secularism and non-violence that Mahatma Gandhi fought the battle for independence against the mighty colonial rulers. As early as 1908, Gandhiji wrote in Hind Swaraj:
“India cannot cease to be one nation, because people belonging to different religions live in it. ... In no part of the world are one nationality and one religion synonymous terms; nor has it ever been so in India.” 
Gandhiji was ably assisted by leaders like Pandit Jawaharlal Nehru, Maulana Abul Kalam Azad and others in the task of fighting a peaceful battle for securing independence by uniting the people of India against separatist forces. In 1945 Pandit Nehru wrote:
“I am convinced that the future government of free India must be secular in the sense that government will not associate itself directly with any religious faith but will give freedom to all religious functions.”
And this was followed up by Gandhiji when in 1946 he wrote in Harijan:
“I swear by my religion. I will die for it. But it is my personal affair. The State has nothing to do with it. The State will look after your secular welfare, health, communication, foreign relations, currency and so on, but not my religion. That is everybody's personal concern.”
26. The great statesman-philosopher Dr. Radhakrishnan said:
“When India is said to be a secular State, it does not mean that we reject reality of an unseen spirit or the relevance of religion to life or that we exalt irreligion. [...] Though faith in the Supreme is the basic principle of the Indian tradition, the Indian State will not identify itself with or be controlled by any particular religion. We hold that no one religion should be given preferential status, or unique distinction, that no one religion should be accorded special privileges in national life or international relations for that would be a violation of the basic principles of democracy and contrary to the best interests of religion and Government. This view of religious impartiality, of comprehension and forbearance, has a prophetic role to play within the national and international life. No group of citizens shall arrogate to itself rights and privileges which it denies to others. No person should suffer any form of disability or discrimination because of his religion but all alike should be free to share to the fullest degree in the common life. This is the basic principle involved in the separation of Church and State.” (Recovery of Faith, New York, Harper Brothers, 1955, p. 202)
27. Immediately after we attained independence, the Constituent Assembly, aware of the danger of communalism [discrimination on the basis of “religion, race and caste”], passed the following resolution on April 3, 1948:
“Whereas it is essential for the proper functioning of democracy and growth of national unity and solidarity that communalism should be eliminated from Indian life, this Assembly is of the opinion that no communal Organisation which by its constitution or by exercise of discretionary power vested in any of its officers and organs admits to, or excludes from, its membership persons on grounds of religion, race and caste, or any of them should be permitted to engage in any activities other than those essential for the bona fide religious, cultural, social and educational needs of the community, and that all steps, legislative and administrative, necessary to prevent such activities should be taken.”
27. [...] During the debates [on the Constitution] Prime Minister Jawaharlal Nehru declared that secularism was an ideal to be achieved and that establishment of a Secular State was an act of faith, an act of faith above all for the majority community because they will have to show that they can behave towards others in a generous, fair and just way. [...]
As the Chief Justices conclude, the Indian Constitution weaves “Gandhiji’s concept of secularism and democracy into the constitutional fabric”. It was noble and it was necessary. Nehru described secularism as “an act of faith” in India’s future.
1. Constitution of India, (as modified up to 2007-12-01). http://lawmin.nic.in/coi/coiason29july08.pdf
2. S.R. Bommai vs. Union of India, Judgment of 1994 -03-11 delivered by Justice S. Ratnavel Pandian, § 28. http://www.judis.nic.in/supremecourt/qrydisp.aspx?filename=11570
3. S.R. Bommai vs. Union of India, Judgment of 1994-03-11 delivered by Justice S. Ratnavel Pandian. http://www.judis.nic.in/supremecourt/qrydisp.aspx?filename=11570
4. No reasonable person could imagine a case where citizenship was denied to those of the wrong religion, but this, in fact, was the case in 19th-century Ecuador when both the Concordat (1862) and the Constitution (1869) conspired to strip non-Catholics of statehood.