His autobiography, Roman, describes him as an atheist. He intentionally made "Rosemary's Baby" ambiguous so that it can be interpreted as having no genuine supernatural events (all just in Mia Farrow's head).
Apparently Polanski has drifted from atheist to agnostic. The following is from a March 5, 2000 New York Post interview discussing his [recent] movie, The Ninth Gate, starring Johnny Depp:
Polanski, who has previously made movies about satanism and vampires, claimed to have no interest in the occult.
"I'm totally disinterested, personally, with that sort of thing," he said. "It does absolutely nothing for me. I'm neither religious nor superstitious. At best I can be counted as an agnostic. Science and technology get me a lot more excited." --BZ