One of the main draws of science fiction is that it can examine ideas outside of their normal cultural context. Hard sf always starts with a "what if" based on science or engineering, which goes something like "What if we had x technology, and how would that change society?" Softer versions of science fiction are basically just set in the future, though.
When we think of spirituality in sf, we usually think of various types of meditation, such as the Litany Against Fear in Dune or the Vulcan mantra against pain in the original Star Trek, or depictions of religious ritual, such as the rituals and customs of different Newcomer religious sects in Alien Nation, the religions of various aliens in Babylon 5, etc. There are religious elements in sf that are obviously drawn from real world religions, such as the obvious Eastern influences on The Force in Star Wars and the depiction of the world as illusion in The Matrix.
...