The above question is one that I've had to think through recently. Someone told me in person that there should be "no other name" for God used in literature, as this constitutes idolatry.
Here are my thoughts on representations of God in literature.
1. If you personally are not being asked to worship the literary representation of God, it is not wrong. If the author is not setting up a god in the process of writing, but rather depicting a different world run by different rules, I believe there is no reason to be alarmed. Another world run by different rules? Clearly this book is not a religious handbook and does not have such specific relevance in the lives of its readers.
2. Literary representations of God usually do not (and simply cannot) capture His entire character - therefore, don't expect them to. When Jesus told the parable of unjust judge, He was representing a god-like character to His listeners. However - as is often the case in story - all facets of God cannot be accurately captured. The Bible says that fullness of God is best seen in Jesus Christ (not in a story). The parable of the unjust judge showed two facets of God - His authority to judge and His absolute power to do so. His grace is shown in a parable like the prodigal son. These are simply two examples of how stories typically only capture particular facets of God's character.
3. Look at Jesus. Jesus told parable after parable about the kingdom of heaven and frequently in these parables, god-like characters had other names - "the father of the prodigal son", "the sower", "the unjust judge", and so on. Jesus was not saying that these characters were God. Neither was He asking his listeners to worship storied figures. He was representing different parts of God's character.
4. Does it honour God? This is the number one question for readers and writers alike to ask once they have established that it is not wrong to represent God in literature - for it is only right if it brings glory to His name. If it's defamatory, by all means, don't read it.
If a story can't capture the entire essence of God, why write allegories at all? What is the point in trying to depict something of your Christian beliefs in story? Is it really useful? Some would argue in the case of fantasy that it is not. But I believe the very strength of representing something of the God we know and worship in literature is the weakness I mentioned above. An author can't capture all there is to God. Therefore, an author must simplify, honing in on one or two concepts and thus rendering these easier to understand.
And so, little by little, piece by piece, stories from a Christian perspective help us to know the Creator of the universe better.