I'm not sure it's quite accurate to say that the Greeks studied "science", since they were far from formalizing the Scientific Method as we know it today. But they did make many significant advances in philosophy and mathematics, which laid a foundation for later developments in science.
In any case, it's quite clear that the intellectuals of classical Greece did not believe in religion. They were atheists; in fact, the word "atheist" is originally from the Greek atheos. There were many different schools of thought among the Greeks: Stoicism, Platonism, Pythagoreanism, Sophism, and more. They disagreed on just about everything---but were remarkably uniform in their rejection of all theistic religions. Only a handful of Greek philosophers ever wrote anything suggesting that they believed in literal gods such as Zeus or Apollo.
One particular Greek philosopher who wrote a great deal about religion (all of it negative) was Epicurus; he wrote the first recorded use of the Problem of Evil. Note that he was writing in the 4th century BC, centuries before Jesus was even born.
Most of the population of Greece was illiterate, however, and knew very little about the intellectual traditions that were forming among their elite. It is quite likely that most of the population continued to believe in the classic Greek pantheon (Zeus, Hera, Apollo, etc.) even as the intellectuals rejected it.