Judges decided that politicians cannot use religion to seek votes meaning they must not be open about their faith, or lack of, in the run up to an election.
"Religion has no role in electoral process, which is a secular activity," a ruling pointed out.
If a politician went against the ruling it would be viewed as corrupt, judges stressed.
Religion was between man and God and should not be involved in politics, said Chief Justice TS Thakur.
The Supreme Court vote on the issue was tight with four in favour and three against the ban.
Those who voted against said: "Discussion on caste, creed and religion is constitutionally protected within and outside elections and this cannot be restricted".
Christians will normally vote for Christian politicians in Indian elections especially in areas where they are underrepresented.