"Failed state like Kerala"? Most states in India would love to be as "failed" as Kerala, including your examples of UP and Bihar. And "low population"? You really need to have a basic info about demographics, before spouting.
BTW money doesn't create high HDI. The culture, plays a large part. Kerala has had universal education since the 1800s. Gender equality and lack of domestic violence and access to healthcare for all etc doesn't happen due to money alone. If that was the case, Arab countries would be a paradise of gender equality.
For your next part - if by "communal", you mean inter-religious violence, obviously that happens only in places where two religious groups co-exist. You cannot have "communal" violence when there is only one community present. But on the rest of UP and Bihar, there have been and continue to be plenty of inter-caste and other forms of inter societal violence. Which goes to show that it is a result of their mentality, their culture, their lack of education(Bihar is one of the least educated states, and more than half of adults have not been inside a school.) If there is no hindu-muslim violence, doesn't mean there is no violence at all there.
By that logic I could say that Muslims make up the vast majority in Northern Kerala and Kashmir, and yet we see no "communal" violence there. So maybe the presence of Hindus is what creates communal violence?
(For heaven's sake, don't take the above sentence literally. It is meant to show you the faulty logic, it is not meant as a statement of truth.)
In short, communal violence (between any two communities) happens in backward parts of the country, where education and progress are low.