... Does there truly exist an insuperable contradiction between religion and science? Can religion be superseded by science? The answers to these questions have, for centuries, given rise to considerable dispute and, indeed, bitter fighting. Yet, in my own mind there can be no doubt that in both cases a dispassionate consideration can only lead to a negative answer. What complicates the solution, however, is the fact that while most people readily agree on what is meant by "science," they are likely to differ on the meaning of "religion." ...
When we consider the various existing religions as to their essential substance, that is, divested of their myths, they do not seem to me to differ as basically from each other as the proponents of the "relativistic" or conventional theory wish us to believe. And this is by no means surprising. For the moral attitudes of a people that is supported by religion need always aim at preserving and promoting the sanity and vitality of the community and its individuals, since otherwise this community is bound to perish. A people that were to honor falsehood, defamation, fraud, and murder would be unable, indeed, to subsist for very long.
When confronted with a specific case, however, it is no easy task to determine clearly what is desirable and what should be eschewed, just as we find it difficult to decide what exactly it is that makes good painting or good music. It is something that may be felt intuitively more easily than rationally comprehended. Likewise, the great moral teachers of humanity were, in a way, artistic geniuses in the art of living. In addition to the most elementary precepts directly motivated by the preservation of life and the sparing of unnecessary suffering, there are others to which, although they are apparently not quite commensurable to the basic precepts, we nevertheless attach considerable importance. Should truth, for instance, be sought unconditionally even where its attainment and its accessibility to all would entail heavy sacrifices in toil and happiness? There are many such questions which, from a rational vantage point, cannot easily be answered or cannot be answered at all. Yet, I do not think that the so-called "relativistic" viewpoint is correct, not even when dealing with the more subtle moral decisions ...
The interpretation of religion, as here advanced, implies a dependence of science on the religious attitude, a relation which, in our predominantly materialistic age, is only too easily overlooked. While it is true that scientific results are entirely independent from religious or moral considerations, those individuals to whom we owe the great creative achievements of science were all of them imbued with the truly religious conviction that this universe of ours is something perfect and susceptible to the rational striving for knowledge. If this conviction had not been a strongly emotional one and if those searching for knowledge had not been inspired by Spinoza's Amor Dei Intellectualis, they wouid hardly have been capable of that untiring devotion which alone enables man to attain his greatest achievements.
http://www.einsteinandreligion.com/irrec.html