Star Trek creator Gene Roddenberry "considered himself a humanist and agnostic"
http://en.wikipedia.org/wiki/Gene_Roddenberry
But he was still open-minded enough not to ban religion from the show..

-
Religion in Star Trek
An alien 'god' demands Kirk worships him but Kirk replies-"Mankind has no need of gods, we find the One quite adequate" (OST: 'Who Mourns for Adonais").
The rebels on Magna Roma, a nearly perfect "Parallel Earth", seem to worship the "sun", which Uhura discovers is actually God's "Son" Jesus. (OST: "Bread and Circuses").
In the wedding chapel on the Enterprise we can see a sort of altar and some religious symbols, among them a cross (OST: "Balance of Terror").
The computer M-5 states: "Murder is contrary to the laws of man and God" (OST: "The Ultimate Computer").
Dr. Ozaba quotes from the Bible- "In His hands are the deep places of the Earth. Psalm 95, verse 4." (OST: "The Empath").
Dr. Phlox says he has been to a Tibetan monastery and that he has attended a mass at St. Peter's Square. This is a most definite statement that religion still plays a role in the 22nd century (ENT: "Cold Front").
Spock, traveling back in time to save his own life, presents himself to his parents as a cousin making a ritual journey "to honor our gods". (TAS: "Yesteryear").
Vulcans, like many other races, believe in a spiritual place from which they as a people were born. Their name for this place is Sha Ka Ree ("Star Trek V").