O you who have believed, let not a people ridicule [another] people; perhaps they may be better than them; nor let women ridicule [other] women; perhaps they may be better than them. And do not insult one another and do not call each other by [offensive] nicknames. Wretched is the name of disobedience after [one’s] faith. And whoever does not repent – then it is those who are the wrongdoers. [Al Hujaraat:11]
Giving others a nick name is not wrong but what is meant is to give someone a name that they either don’t like or is something degrading. Before I knew about this verse I gave some names to people that they did not like and which made them upset. Now after reading this verse I was feeling so bad I had to apologize to them. It does make sense that we do not call people by what they are not comfortable with because to us it is a joke but to the other it can cause bad feelings about each other.