One could define science-fiction as material and God as spiritual without too much fear of controversy, and yet you find both in books. Both are written down to be used in one way or another. Both are written down because they are useful to us in one way or another. You can find detractors and supporters for both. From time to time someone will say, ‘Science-fiction is dead.’ From time to time someone will say the same thing about God.
Writing about what the spiritual future may hold and writing about what the material future may hold turn out to have very similar functions for us. Whether both forms of writing, or either, are inspired by God I will leave to another discussion.
The main difference between religious texts and science-fiction is that if you hold onto a sci-fi book long enough you can check to see how well it predicted things. When Heinlein describes cell phones and space shuttles in Between Planets we can look around now and say, well, how about that! We have those. When he describes alien civilizations on Venus and Mars we can say, Oops! Sorry, Robert, better luck next time.
When Mohamed or Jesus or Moses or Zoroaster or Homer tell us about heaven there’s no real way to fact-check it.
But both forms of writing serve to give us a certain kind of comfort about the future, about what’s going to happen to us, whether they are cautionary tales that urge us to avoid eternal damnation or nuclear holocaust, or stories that promise a place without pain or a future filled with technological wonders.