A complex issue. But there are links to religous and other type of hate crimes.
A review (McDevitt and Levine (2008)) of earlier research (McDevitt and Levine (2002)) identified the key drives behind hate crimes: there are:
A thrill defined hate crime can be defined by fun seeking behaviour. Generally these offenders are looking for excitement.
Based upon their analysis from Boston Police Records, McDevitt and Levine found that the offenders were predominently white and 91% of these offenders did not know the person they were attacking.
The article I've given the link to shows that there is often a social payoff in the group where hatred is seen as 'cool' or 'hip'.
The majority of defensive hate crimes are taken by a solitary individual who believes and rationalises that they are acting for the general benefit of the community. Because of this perpetrators won't feel much guilt from their actions.
This type of hate crime can be seen as a revenge attack to a percieved attack on an individual's own group. Hate crimes in response to 9/11 for instance against muslims. The article points out that in the aftermath of 9/11 there was 1,600% increase in anti-Muslim hate crimes.
This type of hate crime is a more universal attack against all members of an out-group. Here the perpetrator views themselves as having a 'moral' obligation to wage war against other groups. These individuals generally join members of an organisation such as KKK. No more than 5% of all hate crimes involve organised hate groups. Thus mission orientated hate crimes are rarer than the previous categories.
The article in full can be found here:
I agree with @Daniel Sumner. It is human nature we get scared of things that we don't understand. Media portrayal of Muslims is the key factor of hate crimes against Muslims.
Propaganda that all Muslims are terrorist, they will kill us If we don't act now is acting as fuel for hate crimes.