A Common Omission
Pre-modern people were really religious. Really, really religious. Religion influenced every aspect of life. Before our modern concept of science was born, religion explained the way the world worked -- from birth and death, to the weather, to how best to prepare food. To the common person, atheism was unheard of. In the short and brutal lives of peasants, religion was often a singular comfort.
So why, then, does religion show up so sparsely in fantasy fiction? It's a fun world building opportunity, useful for explaining the culture of your imaginary peoples, and it can even influence the plot. Now, I have a feeling that if we all wrote our stories with religion as prominent as it was in real life, they would be kind of hard for modern people to relate to. But I still encourage you to include religion in your fantasy story, probably more than you were planning to. Here's some tips to get you started.
What People Believe versus What's Real
At this point I want to make it clear that you don't have to have actual deities, spirits, and so forth in your fantasy world. As the author, you get to say how your world is really run. But the people who live in it will have ideas about it that you know aren't necessarily true. This is especially the case if you write about more than one culture -- whose religion is right, if anyone's?
You don't have to make the distinction; I just want you to know it's an option, especially if you're not entirely comfortable with religion. And if you do make the distinction, you don't have to make it obvious in your story. As a reader, my favorite is when it's ambiguous who, if anyone, is really pulling the strings.
Basic Design Questions
1. Are there gods and goddesses? (Not all religions have them.) How many? If there are multiple, are they truly discrete beings, or are they just different aspects of the same divine force? Has a deity ever been human? Did they start out human and ascend, or did they go into the world as a prophet or messiah?
2. Where and how did this religion originate? Religions tend to travel, so the country your story takes place in might not be where the religion came from. Who spread the word? Were there prophets, enlightened wise men or women? How widespread is the religion now?
3. Are there any holy books? If so, are they considered to be the words of the divine, or messages delivered by prophets? There might be a canon of texts considered most holy, as well as later texts that are more like opinion pieces. What about books which are considered to be dangerous, like the words of false prophets? On the other hand, some religions don't place much if any importance on texts.
4. What is the religion's creation story? Is there an end times predicted? If so, will a new world be created after, or will the god/dess(es) be finished with that whole creation business?
5. What's the afterlife like? Is there a heaven, hell, multiple versions of each? Does a person reincarnate? If so, for how many lives? What determines where a person goes when they die -- their beliefs, their actions, or just who they are? Do you end up in the same afterlife for eternity, or can you work your way into a different one?
6. What is the organization of the religion like? Is there an equivalent to the Catholic Pope, or any other hierarchy? Can someone chose to live a monastic lifestyle, i.e. a monk or a nun? Do you need to be initiated into the religion, and if you break the rules, can you be kicked out?
7. How does the religion interact with government? It might be more powerful than emperor, have no influence at all, or be somewhere in between. Sometimes they are one and the same. Are there laws pertaining to religion, such as what you can and cannot practice? Can you be thrown in jail for heresy? Keep in mind that "separation of church and state" and "freedom of religion" are relatively modern concepts. What about magic -- encouraged, forbidden? Certain types only? (Those questions might sound familiar.)
8. How accessible is religion to the common people? For example, is there a liturgical language? (For centuries, you had to be able to read Latin if you wanted to read the Bible, and some Catholic services are still performed in Latin.) Do the people in your culture have to be well-educated to study religion for themselves? Are there priests and priestesses, shamans, or other individuals who serve as a bridge between ordinary people and the spirit world? Or can people petition and contact the spirit world on their own?
9. How inclusive or exclusive is the religion? Some religions, like Christianity and Islam, are strict about their believers only following that one path. However, the way religion is practiced in many Asian countries is much more eclectic -- religious practice in China tends to be a mix of Buddhism, Taoism, and folk religion.
10. How has the religion affected people's morals, if at all? To me, this is kind of a chicken and egg question. Do we think stealing is wrong because the religions that have shaped our societies say it's wrong, or do those religions say so because people already sensed that stealing was wrong? But you can take it unique places -- say the primary deity of your religion once lived in the form of a young child, so children are considered exceptionally sacred.
Although religion can merely be a world building tool, I think it's fun to incorporate it into the plot. Here are some ideas.
Interpersonal conflict. Two people who follow different religions, or just have different ideas about a shared religion, might butt heads. This can be a major or minor plot point, even just serving to increase tension throughout the story. You can also ramp up the scale: holy wars, anyone?
Divine intervention. Your characters might receive (or believe they have received) a message or sign from the gods. Or something more dramatic could happen, where the physical and spiritual worlds meet. I'm not advocating a literal deus ex machina, however! Your characters should solve their problems by themselves, and if divine power is involved, at least foreshadow it.
Routines and inconveniences. Do adherents to your religion need to say a certain prayer or do a certain ritual every day? If so, that could cause problems when they're off adventuring. Are they obligated to offer food or gifts to some being? Imagine what a pain that would be if you've only got enough money for one pint of ale. If it's a high priority for a character, they might go to great lengths and get into trouble to fulfill their duty.
Getting in trouble with the religious law. You see a lot of stories about outlaws, but not many about religious outlaws! Remember that in real life the clergy has often been as powerful as the government. What happens if your characters piss them off? And remember my question about canon versus forbidden texts? Maybe your characters could stumble across some information they're not supposed to know.
A crisis of faith. Despite what I said before about atheism being nearly nonexistent in pre-modern times, your character might not be completely at peace with their religion. Maybe they realize they've been following the wrong deity. Maybe the discovery of that apocryphal text that gets them in trouble with the clergy also shakes up everything they thought they knew about the world. The fact is, in the old days most people didn't have an opportunity to question what they were taught. But you can give your characters one!
I've tried to make this post thorough, but don't feel as though you have to follow it religiously (hah! haha. ha. ...) during your own world building. Take what you need to make your story interesting and believable; tweak it as you go. Good luck!