It can. Religion can be used well either philosophically, explain motivations, explore humanity, or as a social commentary. Kurt Vonnegut or PKD for example. PKD was genuinely spiritual in weird but interesting way.
In Galactica a its near constant in the dialogue and its bad. They just repeat religious phrases without any substance and do it a lot. It's like everybody is an atheist playing religious role playing game. Just platitudes.