From The Guardian:
Nothing has had more influence on western literature in the past thousand years than Christianity. Open any book, throw a rock, and you'll hit a Christian idea somewhere on the page. And yet, for a tradition so pervasive, few great writers have been renowned Christians praised by the church. Instead, the relationship between western writers and orthodox religion has been characterised by conflict. Writers are generally independent thinkers who dislike having their thoughts roped by doctrine. The church has always felt more comfortable with conservative Old Testament prohibitions, “don't do this” and “don't do that”. These prohibitions offer a clear hierarchy for judgment. The central commandment of Jesus was “Love one another” – it's not an idea that leverages power for religious brokers. To wield social power a church needs to divide society into good and evil, and to have these divisions recognised as gospel. Jesus was not interested in wielding power. He was a radical, not a conservative. His empathy and compassion, his unwillingness to judge others, his belief in the power of love and forgiveness and his friendship with a prostitute were the kinds of things that attracted writers to his philosophy and, ironically, they put many writers into conflict with the church.
Even writers whose work was distinctly moral and didactic in the Christian manner could be condemned by the church. Dante's Divine Comedy was a religious allegory about man's journey towards Godliness and salvation, yet he was branded a heretic because he questioned the pope's pursuit of secular power. George Eliot, who started her career translating theological texts, was damned for having a relationship with a married man. Samuel Law Wilson, a rambling, late-19th century literary critic, wrote of Eliot's affair: “It was a revolt against the acknowledged canons of Christian morality, a violation of the traditional sanctities of life, a trifling with an institution sacramental in its sacredness, an infringement of social order.” Dante and Eliot highlight two traditional conflicts between the church and the writer: some authors questioned the church's behaviour, others liked to have sex with whomever they pleased. As a consequence, literature and Christianity have made strange bedfellows.
More here.