Iain M. Banks said this quote

Ferbin's father had had the same robustly pragmatic view of religion as he’d had of everything else. In his opinion, only the very poor and downtrodden really needed religion, to make their laborious lives more bearable. People craved self-importance; they longed to be told they mattered as individuals, not just as part of a mass of people or some historical process. They needed the reassurance that while their life might be hard, bitter and thankless, some reward would be theirs after death. Happily for the governing class, a well-formed faith also kept people from seeking their recompense in the here and now, through riot, insurrection or revolution.