Coming back to the original question:
Provided that conscious, sapient life on other planets would take a shape that is even vaguely similar to ours, I'd guess that they would go through the same process of trying to figure out their surroundings as our species did: at first, pretty much every phenomenon that is incomprehensible to them will be "explained" by means of the supernatural, and they will project conscious, sapient agency everywhere:
A river floods the village each spring? The river god must be angry. Create a ritual feast of redemption, and he'll be appeased. (As evidenced by the retreating water.)
Lightning? The sky-god rages.
Plagues? Divine punishment for offenses against the gods.
Random cultural taboos? Holy decrees proclaimed by the deity.
It's such a fundamental impulse that these beliefs might even survive well into the age of interstellar travel. Of course, they would picture their deities in terms relatable to them. An insectoid swarm intelligence would picture gods who think, feel, and act like a hive queen rather than a dominant alpha primate.