Vaal: In the 1968 Star Trek: the Original Series episode called "The Apple" Kirk and party land on Gamma Trianguli VI a planet with exploding rocks, dart shooting plants and killer lightning. I believe this episode holds the record for the number of on screen 'red shirt' deaths. The planet's population worships a god called Vaal, which is actually a computer fueled by biomass and that can control the planet's weather and shield itself. Kirk fortunately decides to change computer tactics and destroys it with the Enterprise's phasers after he starves it.
(Image courtesy of Memory Alpha)