I'm currently reading Steven Pinker's wonderful book Better Angels of Our Nature. It's a blast and I highly recommend it.
Drawing on the work of Nobert Elias, Pinker argues that state formation and the expansion of commerce dramatically reduced violence in Europe and, eventually, the world.
Let's focus on the second part of the explanation: commerce. It is a standard line among socialist and liberal egalitarian academics (and perhaps academics more generally) that capitalism is driven by "greed and fear". According to the more plausible version of this thesis, capitalism encourages and embodies greed. The renowned socialist philosopher G.A. Cohen says: "unlike its predecessor feudal civilization, which has the grace to condemn greed, capitalism celebrates it."
This is profoundly wrong. Capitalism encourages virtues like honesty, trust, fair-dealing, and self-control. As Pinker shows, Medieval Europe was rife with violence and greed. People would lash out violently at slight provocations. It was common to cut off people's noses to avenge insults. George Martin's depiction of life under a medieval order is no exaggeration: violence and horrendous brutality permeated life before capitalism.
Commerce helps things. To become successful in a commercial society, you need to cultivate the dispositions of self-control. You generally need to be honest to protect your reputation. If you want to sell things, you also need to see things from other people's perspectives. This encourages empathy. Violence will often damage your own prospects too.
To be fair, commerce alone does not do these things. The broader set of institutions that support capitalism, such as the rule of law, also encourage trust and civility. Of course, greed and violence exist under capitalism too and it is, I suppose, possible to imagine a society that does an even better job than capitalism at extinguishing vice. But, if you care about promoting virtue in practice, you should go with capitalism every time.