While you can certainly use your writing to relay your convictions or teach moral lessons, it’s best if you don't use your characters or narrator as soap box speakers. Readers know when they've suddenly been jerked out of Middle Earth and dumped into church or a political pep rally, and since the bait-and-switch was never noted on the ticket, now you've got them steamed.
I am a Christian and cannot separate myself from my core beliefs. I can create other characters with different opinions than me and make them believable, but I could not write a book centered around evolution let’s say, because I believe God is the Creator of all. While I’m friends with atheists, wiccans and homosexuals because I’m interested in knowing and loving people regardless of what they believe, I cannot write something with the intent of spreading a message that is contrary to my views.
One of my threads in Kings & Queens follows a character’s path to redemption. It’s not the main point of the book, but it’s still resonating because of this character’s hunger and need to feel free and forgiven. Instead of preaching, I demonstrated God’s grace in his life, and I didn’t expound on it in the narrative. Since I’m writing for a mainstream audience, that’s not fair to readers who don’t believe in Jesus or the Bible to suddenly get dealt a sermon out of nowhere. I’m not trying to preach. I’m trying to show.
Now in my story’s context, it’s not a “Christian” book, and it doesn’t matter what a reader believes because my beliefs are in the character’s experience. With his sin being so wretched, God’s grace is strong enough to speak for itself. The door is open for someone to think, Hey, if God can forgive a person like that, then He could totally forgive me. I can still impact readers who have the same kind of hunger as my character without alienating and putting-off the rest.
My sequel, Sapphire Reign, gets darker and has spiritual elements also, but now I'm trying to demonstrate God's power and love. Because there's an underlining spiritual battle going on, it's been a challenge to keep that God-element low-key in the story. It needs to be there but not in an obtrusive way.
Sparks of inspiration are birthed out of conviction, but when you’re infusing that fire and fury into a piece, and you’re intending on marketing it to a broad audience, step away for a while, then come back to it and try and read it as someone with a different view. Even members of your choir don't like to be preached at. In fiction, it's a total groaner. Does your prose sound like a protest, a sermon, a pointing finger? Is it too obviously drenched in your beliefs that it no longer sounds like fiction? If so, you’ll need to rework it so that your point won't be so head-bashing. Subtlety works best. Try to show and demonstrate as much as possible and speak a whole lot less. Stay invisible as an author so your readers won’t be reaching for tomatoes and stones.
~ Signing off and sending out cyber hugs.