That quote is taken out of context of a much longer essay written by Einstein.
In a letter written in 1954 he wrote this:
“The word God is for me nothing more than the expression and product of human weakness, the Bible a collection of honorable, but still purely primitive, legends which are nevertheless pretty childish. No interpretation, no matter how subtle, can change this for me.”
What is clear from Einstein’s writings on science and religion, though, is that he didn’t believe in a personal God, and saw theistic religion as a man-made fiction.