It should be noted that Star Trek has always handled the subject of religion carefully. The few times the concept has been raised, the answer (once in the form of Picard speaking to Data) was that knowledge isn't complete, and who knows - not a pro-religion answer, and it reminds me of the famous quote by Dumbledore, "After all, to the well organized mind, death is but the next great adventure." Other cultures have been very strongly religious (the Bajorans, specifically, as well as Chakotay in Voyager) but there's never been a truly "divine" intervention.
(It should be noted that the original series sometimes had some wonky pro-god stuff, like the episode with the Roman Empire where people discovered the Son of God. I'm talking about modern Star Trek here, not hippie Trek.)
In this episode, the Enterprise is on their way to relieve a survey station wherein Federation archaeologists are studying a culture called the Mintakans, a proto-Vulcan race that is governed by reason, unusual for many humanoid species at this stage of development, but not unusual for the proto-Vulcan style beings they are. However, before the Enterprise can arrive to relieve the surveyors and repair their "duck blind", the station's core explodes, dropping the holographic screen, allowing the Mintakans to see the station.
An away team beams down to the station to begin recovery and rescue operations, however, a Mintakan named Liko climbs up to the station, looking inside and gettin1g shocked by touching the downed holo screen. With Liko critically injured, Dr. Crusher decides to bring him up to the Enterprise for emergency surgery. Picard lambasts Crusher about violating the Prime Directive; she promises to try and wipe Liko's memory, but says that his proto-Vulcan brain is resistant to the methods used for removing his short term memory.
Liko is returned to the surface; meanwhile, the survey team realizes that one of their members, Palmer, is missing - having fallen out of the duck blind after the core explosion. Troi and Riker are surgically altered to look like Mintakans and beam down to the planet. Here they find Liko telling the Mintakans about his encounter with "The Picard", who he claims is the deific Overseer that the Mintakans had stopped worshipping generations ago, who brought him back to life from the dead.
Riker and Troi relay that the Mintakan civilization has been contaminated by Crusher's interference; they find out how contaminated when the Mintakans find a badly injured Palmer. A discussion of what to do with Palmer arises, Liko insisting that he must have been punished by "The Picard", and the group considers that they should finish the punishment. Riker and Troi argue against this view and for using reason; but Liko insists. Troi distracts the group while Riker escapes with Palmer, but he is seen, and Troi is captured after Riker and Palmer beam out.
The length of contamination is evident; the survey leader believes that belief in the Overseer will spread throughout the Mintakan homeworld from this point, and urges Picard to appear to the Mintakans to set rules for the newly rediscovered religion. Picard, for his credit, is horrified by the concept of a religion arising on a world that had known none:
Horrifying... Dr. Barron, your report describes how rational these people are. Millennia ago, they abandoned their belief in the supernatural. Now you are asking me to sabotage that achievement, to send them back into the dark ages of superstition and ignorance and fear? No!
A traditional, but brilliant, Picard speech. Instead, Picard decides to beam up the Mintakans' leader, Nuria. He shows her the Enterprise, explaining that that he is simply from a culture that has greater technology than the Mintakans, much as the Mintakans have learned to build homes, weave cloth, and create powerful bows, his people have learned to sail the stars. Even still, she refuses to believe that Picard is not a god until she watches the death of one of the members of the survey team.
On the planet, things are getting worse. Liko insists that, due to the arrival of a storm, "The Picard" is angry at Troi. He wants to punish her for Riker stealing away with Palmer, hoping to please the god he now worships. As Liko is about to shoot Troi with his bow, both Nuria and Picard arrive. Nuria tells Liko that she has watched members of Picard's people die, but Niko insists Picard is a god, begging for the man to bring his wife back to life.
When Picard responds that he cannot, because he is just a man, Liko (in desperation) points his bow at Picard. Nuria tries to get in the way, but Picard pushes her aside, telling Niko to shoot, if it's the only way that Picard can prove that he is a mortal man. Niko shoots, but his daughter tries to push him aside at the last moment; Picard is shot through the collarbone, and his blood is the final proof that he isn't god.
The episode ends with Picard revealing the duck blind to the Mintakans, and they express a willingness to eventually learn to sail the stars, much as the crew of the Enterprise does, having again relinquished their belief in the Overseer.
So, here's the deal. Picard sees a species that has abandoned religious beliefs, and when they want to pick those back up, he wigs the fuck out and declares that he will not have it, even violating the Prime Directive more so that he can save the Mintakans from the fate of having a religious destiny.
Is religion that bad? The answer would seem to be yes. Picard says it himself - the history of religion is a history of war, torture, violence, and hatred. The Mintakans have an unusual advantage in that they realized at an early stage of civilization that such things are bullshit; as a result, they appear capable of advancing rapidly, and considering their situation in manner we wouldn't ascribe to, say, 800s Europe.
In the end, Picard sees the danger to the Mintakan people that religion poses, specifically a vindictive, violent religion that appeared to be welling up around his visage. He takes some serious steps to get the Mintakans back on the course of reason. In the end, when he faced down Liko and demanded that the Mintakan shoot him to prove his point, Picard proved that he would rather be killed by a primitive arrow than corrupt a reason-based society with the evils of religion.
Extrapolating a bit, what are the writers and producers trying to say? Memory Alpha doesn't really have any behind-the-scenes discussion of this episode, but it is a known fact that religion is responsible for probably more deaths than any other social phenomena, including Nazism and Communism (consider, the Reformation, the Crusades, the conquests of Africa, Asia and the Americas, the taming of the noble savage, manifest destiny, 9/11, the Iranian Revolution, and the destruction of Jerusalem, for starters). To me, they're warning us that religion when taken seriously and considered ahead of reason has only one course: death and disaster.