Limitless energy + perfect virtual reality simulations, run by indestructible, unhackable equipment, with all source code fully open. Then, downloadable knowledge, allowing everyone to make perfectly well-informed decisions. With absolute universal knowledge, each person is qualified to examine any workings of the VR simulation and throw in their own safeguards to prevent brainwashing. Now anyone who wants to opt out of reality can live in their own simulated heaven, meaning that all the disaffected members of society can just leave.
For the suckers who decide to stay in the real world, limitless energy and replicators allows anyone to obtain anything they need, removing wars over resources and greed as a source of conflict in the world. Add in space travel and perfect terraforming capabilities to remove overpopulation as a problem.
Perfect knowledge means all people can work towards their own self-actualization. We'll doubtless have a better grasp of psychology and sociology by then, too, allowing for some nice social engineering. And given perfect knowledge, each person is able to spot manipulation, giving all of us a very good shot to avoid being taken advantage of and controlled.
Hopefully, this removes pretty much all motivations people have to start wars and dictatorships, and gives us a safety valve out in any case in the form of VR.