Religion is an excellent way to flesh out your world. On a personal level, it can help you work out what actions a character might take in a difficult situation. On a broader level, religion (or lack thereof) often plays a role in the way communities choose to handle ethics and morality.
Religion can allow a space to explore themes of prejudice and exclusion (both from within the religion and toward it). On the flipside. religion gives a medium to write stories of generosity, sacrifice, and love.