Found in 1 comment on Hacker News
Freud's Civilisation & It's Discontent. It's not purely about religion/morals but he does touch on it from an interesting angle:

https://www.amazon.com/Civilization-Its-Discontents-Sigmund-...

Fresh book recommendations delivered straight to your inbox every Thursday.