That is the forthcoming book by my excellent colleagues Noel Johnson and Mark Koyama, due out next January, you can now pre-order here.
Here is the Amazon summary:
Religious freedom has become an emblematic value in the West. Embedded in constitutions and championed by politicians and thinkers across the political spectrum, it is to many an absolute value, something beyond question. Yet how it emerged, and why, remains widely misunderstood. Tracing the history of religious persecution from the Fall of Rome to the present-day, Noel Johnson and Mark Koyama provide a novel explanation of the birth of religious liberty. This book treats the subject in an integrative way by combining economic reasoning with historical evidence from medieval and early modern Europe. The authors elucidate the economic and political incentives that shaped the actions of political leaders during periods of state building and economic growth.
I have read the entire thing (a slightly earlier draft), very definitely recommended.