"Wherein consisted the happiness and perfection of a man, considered not only as an individual, but as the member of a family, of a state, and of the great society of mankind, was the object which the ancient moral philosophy proposed to investigate. In that philosophy the duties of human life were treated of as subservient to the happiness and perfection of human life. But when moral, as well as natural philosophy, came to be taught only as subservient to theology, the duties of human life were treated of as chiefly subservient to the happiness of a life to come. In the ancient philosophy the perfection of virtue was represented as necessarily productive, to the person who possessed it, of the most perfect happiness in this life. In the modern philosophy it was frequently represented as generally, or rather as almost always inconsistent with any degree of happiness in this life; and heaven was to be earned only by penance and mortification, by the austerities and abasement of a monk; not by the liberal, generous, and spirited conduct of a man. Casuistry and an ascetic morality made up, in most cases, the greater part of the moral philosophy of the schools. By far the most important of all the different branches of philosophy, became in this manner by far the most corrupted" (WN, 771).Smith recommends that political regimes should never adopt or legally enforce the tenets of any religious sect. If the government "allowed every man to chuse his own priest and his own religion as he thought proper," then there could be a great multitude of religious sects, perhaps thousands, freely competing for believers without any sect having the power to persecute members of other sects. This free marketplace of religions "might in time probably reduce the doctrine of the greater part of them to that pure and rational religion, free from every mixture of absurdity, imposture, or fanaticism, such as wise men have in all ages of the world wished to see established" (WN, 792-93).
These little religious sects might become "disagreeably rigorous and unsocial" in their morals, but the government without using violence could correct this in two ways (796). First, promoting the study of science and philosophy among people of the middle and upper classes could advance the scientific knowledge that is the "great antidote to the poison of enthusiasm and superstition." The second remedy is to protect the liberty for public entertainment such as dancing, poetry, painting, music, and dramatic presentations.
That "pure and rational religion" sought by all wise men might conform to "the idea of that divine Being, whose benevolence and wisdom have, from all eternity, contrived and conducted the immense machine of the universe, so as at all times to produce the greatest possible quantity of happiness," which is "certainly of all the objects of human contemplation by far the most sublime" (TMS, 236). Such an idea supports the universal benevolence of the wise and virtuous man, who must be disturbed by any suspicion that this idea is false.
"To this universal benevolence, on the contrary, the very suspicion of a fatherless world, must be the most melancholy of all reflections; from the thought that all the unknown regions of infinite and incomprehensible space may be filled with nothing but endless misery and wretchedness. All the splendor of the highest prosperity can never enlighten the gloom with which so dreadful an idea must necessarily over-shadow the imagination; nor, in a wise and virtuous man, can all the sorrow of the most afflicting adversity ever dry up the joy which necessarily springs from the habitual and thorough conviction of the truth of the contrary system" (TMS, 235).The wise and virtuous man's Christian virtue of universal benevolence, Hanley infers, could not be sustained if he believed in a "fatherless world." "His capacity for such activity is sustained not by sentiments but by his love of the whole, which is supported by his belief in the existence of God" (188).
But while Smith is affirming the calming effect of the idea of the universe as intelligently and benevolently designed by God, it's not clear that he is affirming the truth of this idea. Moreover, while Smith often recognizes the importance of religious belief in reinforcing our moral sentiments, he also indicates that even atheists who have no belief in an afterlife with eternal rewards and punishments still have the moral sentiments that support their moral conduct. Even atheists dread the thought of doing something that would make them the proper objects of hatred and contempt. And even if they thought that their contemptible conduct would be forever concealed from anyone's view, their imagination of how they would appear to the impartial spectator would still trouble their conscience. Nothing could free them from "these natural pangs of an affrighted conscience" except "the vilest and most object of all states, a complete insensibility to honor and infamy, to vice and virtue" (TMS, 116-18). Today, we might recognize such "complete insensibility to honor and infamy" as the condition of pure psychopaths.
From his reading of Hume's Dialogues Concerning Natural Religion, Smith was aware of the weaknesses in the argument for a natural theology of intelligent design, and of the possibility of explaining the apparent design in the universe as a product of unintelligent natural evolution. But when Hume asked Smith to supervise the publishing of the Dialogues after Hume's death, Smith refused, saying that he was "uneasy about the clamour which I foresee they will excite," and that he preferred that they remain in manuscript to be read by only a few people (Correspondence, 211, 216).
From his close friend James Hutton, Smith heard about the evidence that the Earth was probably millions of years old, in contrast to the six thousand years suggested by the Bible, and that the Earth was being continuously changed by natural forces rather than cataclysmic acts of divine creation. This made Darwin's theory of evolution possible.
Part of Darwin's theory was a theory of moral evolution. And for that, Darwin was deeply influenced by Smith, Hume, and the Scottish philosophers. He concluded that in the evolution of morality, "with the more civilized races, the conviction of the existence of an all-seeing Deity had had a potent influence on the advance of morality" (Descent of Man, Penguin edition, 682). And yet even without belief in God, human beings could develop morality through their desires for a mutual sympathy of sentiments that could generate a sense of conscience:
"A man who has no assured and ever present belief in the existence of a personal God or of a future existence with retribution and reward, can have for his rule of life, as far as I can see, only to follow those impulses and instincts which are the strongest or which seem to him the best ones. A dog acts in this manner, but he does so blindly. A man, on the other hand, looks forwards and backwards, and compares his various feelings, desires, and recollections. he then finds, in accordance with the verdict of all the wisest men that the highest satisfaction is derived from following certain impulses, namely the social instincts. If he acts for the good of others, he will receive the approbation of his fellow men and gain the love of those with whom he lives; and this latter gain undoubtedly is the greatest pleasure on this earth. By degrees it will become intolerable to him to obey his sensuous passions rather than his higher impulses, which when rendered habitual may be almost called instincts. His reason may occasionally tell him to act in opposition to the opinion of others, whose approbation he will then not receive; but he will still have the solid satisfaction of knowing that he has followed his innermost guide or conscience.--As for myself I believe that I have acted rightly in steadily following and devoting my life to science" (Autobiography, Nora Barlow edition, 94-95).In enjoying the self-approbation of his conscience and his devotion to a life of science, Darwin shows how moral and intellectual virtues can be motivated by self-love as rooted in evolved human nature.
Some posts on related topics can be found here, here, here, here., here, and here.