I generally prefer to see homosexuality and the like handled by parliament and not by courts (less controversial) but in any case great news for India!
I don't believe a parliament should be able to decide what is and is not a fundamental human right. Any reactionary government (the current one, for instance) would easily be able to overturn it.
I was under the impression that those kinds of laws were the ones that are never going to be repealed even if a reactionary government comes into power, plus legalization by an elected parliament will always be more "legitimate" in the eyes of the people than legalization by unelected judges.
Has any country that legalized homosexuality (or gay marriage) ever made it illegal again?
In any case it's great news though.
The USSR decriminalised homosexuality under Lenin, then criminalised it again under Stalin. After Stalin died, the laws remained on the books but weren't enforced; it was finally redecriminlised by Yeltsin in the 90's. And of course, now "promoting" homosexuality has been banned again by Putin.