Post History
I'm going to say no, but do it anyway. Which may be confusing, but let me explain. Religious groups are diverse, and you won't be able to represent that diversity in your book, because you will...
Answer
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/46877 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
I'm going to say no, but do it anyway. Which may be confusing, but let me explain. Religious groups are diverse, and you won't be able to represent that diversity in your book, because you will only have so many characters who will belong to each group. We are all slaves to subjective biases, like 'What you see is all there is' (WYSIATI). Our perspective is limited to the obvious. As you are no doubt aware, most are quite precious about their beliefs. But they are precious only about a specific interpretation of an ideology. Usually other interpretations are regarded as heresy, though for the most part this doesn't apply to Hinduism. A Sunni may not care too much if a Shia is portrayed negatively, just as a Catholic may not be too concerned if a Protestant is portrayed negatively. Importantly, you are unlikely to create a character who matches any given individual's subjective bias. Therefore, you can create many reasonable characters, and yet will be harshly criticised. If a negative character is Muslim, you're a bigot. If a positive character is Muslim, you're an apologist. If you have two Muslim character, one good and one bad, you'll be accused of tokenism because their being Muslim will be regarded as insufficiently fundamental to their character; you just made them Muslim as a multicultural afterthought. The only way to create an authentic character is good research. For example; to start on Hinduism, I might advise reading Shashi Tharoor's 'Why I am a Hindu' which discusses the history of Hinduism and contemporary Hindu politics (the author being a liberal Hindu disapproves of Hindu nationalism). Then you could go further, reading Hindu texts (Bhagavad Gita, Upanishads), investigating Hindu demographics, history, music, cuisine, religious leaders, etc. With such knowledge you will be able to construct a character whose motivations are believably grounded in a specific culture. The real test of course will be whether someone from that group can recognise your fictional character as one of their own. Approval isn't really the point; if you write a Hindu nationalist, a liberal Hindu reader will disapprove of their world view, but they should be able to recognise whether this character is authentic or not.