The Catholic Encylopedia on the Flagellants.
The Black Death (1347-1351) took away between one third and one half of the population of Europe. That same century had seen the papal schism, a brutal famine, and the Hundred Years War (which represented the first nation state war in European history).
The clergy was devastated by the plague, and the following generations were poorly educated in contrast to the golden age of theology in the 1200's. Death seemed to be at everyone's elbow. The mood was morbid and apocalyptic. There was much discussion of the putrefecation of the body, and being eaten by worms, and what the resurrection of the body was going to be like. Look up the "The Three Living and the Three Dead", the Danse Macabre, and Transi Tombs to catch the tenor of the times.
I was a pauper born, then to Primate raised
Now I am cut down and ready to be food for worms
Behold my grave.
Whoever you may be who passes by,
I ask you to remember
You will be like me after you die
All horrible, dust, worms, vile flesh"
- Tomb of Henry Chichele, d. 1443
In the play "Everyman", which symbolizes any man about to die, Everyman is abandoned by his friends (Fellowship), his family (Kindred and Cousin), and his material possesions (Goods). His only steadfast companion unto the grave is his charitable works (Good Deeds) which he has been neglecting. A key emphasis in the piety of the times was laid upon Confession and the necessity to do penance, which sets Everyman on the path to salvation.
Postscript: An interesting thing happened this morning. When they distributed the ashes at Mass they said, "Remember, man, that thou art dust, and to dust thou shall return" I hadn't heard that in a long, long time. For years it had been "Repent and believe in the Gospel."
See more on that very topic from this J. Peter Nixon post on dotCommonweal.
While the Ash Wednesday injunction to “repent and believe in the Gospel” is more biblical, I must confess that I miss the older “Remember thou are dust and unto dust thou shalt return.” The shock of being confronted with the certainty of our death is a good way to begin Lent. Sic transit gloria mundi.