Human beings are highly social creatures. To varying degrees, we all have a compelling need for belonging and acceptance. Experiencing rejection by others or being excluded from groups to which we want to belong can have powerful consequences. This summary cited by the Social Psychology Network provides some further insights.
Social Acceptance and Rejection: The Sweet and the Bitter