It might shock you to know that he said “he looks upon individual existence as a sort of prison” and that he “wants to experience the universe as a single significant whole”, which will fill him with a “cosmic religious feeling”.
In his view, such transformative experiences have been attained by only a few individuals. He elaborates further:
"The religious geniuses of all ages have been distinguished by this kind of religious feeling, which knows no dogma and no God conceived in man's image; so that there can be no Church whose central teachings are based on it. Hence it is precisely among the heretics of every age that we find men who were filled with the highest kind of religious feeling and were in many cases regarded by their contemporaries as Atheists, sometimes also as saints. Looked at in this light, men like Democritus, Francis of Assisi, and Spinoza are closely akin to one another.”
Regarding Art and Science, Einstein says,
“In my view, it is the most important function of art and science to awaken this (cosmic religious) feeling and keep it alive in those who are capable of it. We thus arrive at a conception of the relation of science to religion very different from the usual one. When one views the matter historically one is inclined to look upon science and religion as irreconcilable antagonists, and for a very obvious reason. The man who is thoroughly convinced of the universal operation of the law of causation cannot for a moment entertain the idea of a being who interferes in the course of events—that is, if he takes the hypothesis of causality really seriously. He has no use for the religion of fear and equally little for social or moral religion".
In Einstein's view God is not a giver of moral laws. He says
“A God who rewards and punishes is inconceivable to him for the simple reason that a man's actions are determined by necessity, external and internal, so that in God's eyes he cannot be responsible, any more than an inanimate object is responsible for the motions it goes through. Hence science has been charged with undermining morality, but the charge is unjust.
“A man's ethical behaviour should be based effectually on sympathy, education, and social ties; no religious basis is necessary. Man would indeed be in a poor way if he had to be restrained by fear and punishment and hope of reward after death.”
Einstein continues in this vein,
“It is therefore easy to see why the Churches have always fought science and persecuted its devotees. On the other hand, I maintain that cosmic religious feeling is the strongest and noblest incitement to scientific research. Only those who realize the immense efforts and, above all, the devotion which pioneer work in theoretical science demands, can grasp the strength of the emotion out of which alone such work, remote as it is from the immediate realities of life, can issue. What a deep conviction of the rationality of the universe and what a yearning to understand, were it but a feeble reflection of the mind revealed in this world, Kepler and Newton must have had to enable them to spend years of solitary labour in disentangling the principles of celestial mechanics!”
Although defending science and art as being the highest and noblest of human activities, Einstein, I think, is going beyond this and declaring that the best of scientists have always experienced a transcendent condition of wonder which is beyond reason, which is essentially a "mystical" experience. It is from this unique sense of "wonder" that a scientist's creativity springs. In Einstein's case it was his personal experience of a transcendent state of consciousness that enabled him to develop the special and the general theory of relativity.
All quotations are from “The World As I See It” by A. Einstein.