A crime based on an act of hate of, or prejudice against, an individual’s or individuals’ legally protected characteristics is, effectively, a legal concept and social construct only. It has its longest history in the USA, the seeming birthplace of identity-politics, but  varies by society based on what social and personal characteristics are deemed particularly worthy of protection. Psychology therefore has little to offer in terms of whether an act is a hate-crime, but it does have a lot to offer on why that hate or prejudice exists and the particular short- and long-term effects of such acts on the victim. Social-cognition theory explains how we are biased against others from out-groups, especially if they can be visibly associated with damage to the larger group (as in terrorism); these biases are also affected by socioeconomic stressors, media-manipulation, etc., but these latter factors do not explain why someone commits such an act. Suffice it to say that they occur more often in a context where offenders feel that their livelihood or way of life is threatened by changes in the demographic make-up of their ‘community’, however they construe that.
Sometimes it boils down to cognitive and emotional stress, where it is easiest to blame someone who seems different and where there is a reduction in the perpetrator’s ability to self-regulate and self-censor. A case of a person with severe brain-injury comes to mind, where she had damage to the frontal, temporal, and occipital lobes of her brain following an accident and subsequently developed what looked like strong but spasmodic racism; there was no particular belief or world-view about race, just an abject fear of people whose faces were harder to make sense of. Hate-crime is fundamentally about social fear.
Hate-crime also doesn’t necessarily make sense: a perpetrator can be unaware of what s/he has done or can be irrationally selective/random in their hate-acts, while having, for instance, a valued house-cleaner who is a member of the group to which the victim of the defendant’s behaviour also belongs. Sometimes there is a reasoned (though not necessarily ‘reasonable’) world-view—as in religious or other ideological extremists. However it may be, two commonalities help disambiguate hate-crimes from others: the offenders can often act without any extrinsic motivator or reward in a seemingly pointless but focused gesture, and, secondly, that it is an act of attempted dominance or recouping of relative social and personal power. Links to the drivers of domestic violence seem clear enough, though in the social rather than private arena.
The effects on victims are more pronounced than with equivalent acts that lack a hate-crime context. Victims are more likely to develop PTSD and mood-disorders such as depression and anxiety. Core aspects of identity are affected, leading to damaged self-esteem, an increased sense of threat, and a sense of aggressive social exclusion. These effects can also occur if someone simply witnesses a hate-crime against a member of their own social group if that person is particularly sensitive to such violence—a form of vicarious trauma. Their history of identity-development is often crucial in this regard: while it may not be as significant for members of a group who grew up as part of a social majority, for someone who had to develop their social identity by leaving a majority group to join a minority one, particularly later in life—such as LGBTI individuals who came out late—the mental damage due to exactly the same offence can be dramatic.