Umm, this has already happened before... Germany in the 1960s legalized pedophilia, in order to fund a sexual experiment on orphaned children: https://sputniknews.com/europe/201612161048653141-german-pedophilia-project/
They recruited convicted pedophiles and sex offenders to act as foster fathers to the orphans, in the hopes it would produce beneficial effects of some kind. In other words, they were trying to find proof that pederasty was good for kids.
They outlawed it again soon after, when they started seeing the terrible effects it was having on the kids. As far as I'm aware, it wasn't legalized outside of the senate-funded experiment (which at any other time would've been highly illegal).
Despite this terrible incident, the German Green Party campaigned for pedophiliac rights in the 1980s, at the same time as North American Boy Love Association and the Childhood Sensuality Circle were campaigning for it in the US.
Now, what drove them to do this? The sexual liberation movement. In both cases, that was the driving force behind these policies, and why they were ever able to pass. The movement was about discarding modern values, and doing what would be obscene by modern standards, in the hope that this would lead to some kind of enlightened utopia.
I would suspect ancient Greek influence may be involved with the thought process. Because, notably, the western world is founded on a society that thought pederasty was good for boys (and probably girls). The West wouldn't be turning to ideas of pedophilia, but returning to them.
What would be Required?
Largely, just people to get excited for the idea the same way NAMBLA is.
What would get them excited
Now, how could you get a large portion of the population to abandon the previous generations' ideals and take on such an extreme view? Largely, by a major catastrophic event. In the Sexual Liberation Movement's case, it was World War 1. That war broke so much faith in the system, that dissent against it grew strongly. The SLM came about in the 1920s.
But it was still a very minority view. To really change such a deep-seated idea, you need a SERIES of catastrophic events. Another world war, a great depression, a terrifying cold nuclear war, the rise of hard drugs in the West, and finally a historically unpopular war with Vietnam. Only after all this did the SLM take off, before it was a minority of extremists movement. To put it into perspective, homosexuality was illegal in many US states until the start of the 2000s.
The other method is simply by cultural views evolving. Transexuality has had little to do with major events, you can't really link it to 9/11 or the Gulf wars or such. Its rising prominence and acceptance seems to be related to effective social movements, namely in colleges. If a society's teachers and reporters decide to teach something, and they are held in any respect or repute, then it is only a matter of time before their views become the dominant views of the public.
Already we are seeing some of this, with major feminists openly associating with and defending self-admitted and convicted pedophiles on twitter and twitch. You might also draw a parallel to the bizarre case (again in Germany) of a man who raped a boy in a public dressing room, but was let off without any significant charges. If you start accepting people who rape boys, then people who "consensually" have sex with them will seem reasonable.
Those are the two methods by which you get major social change.