As recently as 30 years ago, most of the world's homosexuals and lesbians lived in places where their sexual preferences were illegal. Even where gay relationships were legal, consenting adults with same-sex orientations were abused and ostracised. They were discriminated against in workplaces. Things were even worse for transgendered people; they did not even exist since gender was binary in law.
Being gay is still a crime in many places and subject to horrific punishments. The "crime" is punishable by life sentences and the death penalty in many countries, especially in those that impose sharia, and also in certain African nations.
But there has also been a perceptible change in attitude in other parts of the world, where the sexual orientation of consenting adults is no longer considered the state's business. Not only has gay sex been decriminalised in many countries, corollary freedoms like same-sex marriages have also been granted. In many places, transgender orientations have also been recognised in law.
Even in India, where sadly, male same-sex relationships remain criminalised, same sex orientation finds more acceptance. There are annual gay pride parades; many LGBT activists have come out of the closet and there is an active campaign for the repeal of the Victorian prohibitions in the Indian Penal Code. The existence of transgender people is now recognised in law with a third entry possible in the gender column.
Legislation is uneven on these fronts. Even in countries where same sex relationships are legal and transgenders are recognised, marriage may be out and recruitment to the defence services may be barred. In some cases however, lawmakers have gone the logical distance by legitimising same-sex marriages, easing adoption laws, banning workplace discrimination, etc.
Many of the more progressive lawmakers were surely responding to social pressure when they realised voters favoured decriminalisation. Even in Russia and China, where voter preferences aren't particularly important, decriminalisation has occurred in theory and the change must have been driven by social attitudes to some extent.
What changed and why? Prejudices against gays, lesbians and transgender folks are deep-rooted. These prejudices also have religious sanction. Same sex relationships are condemned as "unnatural" in most religions. Religious people tend to form extremely vociferous lobbies everywhere and most religious groups continue to condemn same sex relationships very loudly.
Lawmakers who opted to change laws would have been well aware, both individually and collectively, that they would antagonise religious lobbies by decriminalisation. So, why did lawmakers in so many places decide to ignore the religious lobbies and get out of citizen's bedrooms?
Presumably, the progressive lawmakers calculated that they stood to gain more from gay and lesbian voters and also from "hetero-normals", who supported LGBT rights. So, changes in the law probably occurred only where lawmakers reckoned that the pro-LGBT lobbies outnumbered the religious opponents of granting LGBT rights.
A significant proportion of the global population is, and has always been, LGBT in orientation. But unlike the religious, LGBT folks have not historically, organised or been politically aware. LGBT lobbies only started forming in the 1980s. The "pink dollar" - money spent by the LGBT community - also became a talking point only in the 1980s.
The advent and the proliferation of the Internet and the rising global penetration of cable/ satellite TV gave activists a collective voice and visibility. It allowed them to band together, both locally and across frontiers. This visibility must have been important in influencing public opinion and inducing lawmakers to decriminalise.
There must be lessons here for India's LGBT community and for their supporters. The community will have to keep the noise level high and emerge as a credible lobby in terms of vote share. It will need to be at least as vociferous as the religious loons who oppose it. Multiple obscure castes, sub-castes and religious minorities have learnt to make the sort of noises that confer political leverage. It should not be an impossible task for the LGBT community to beat them at this game.