Backbiting is decided as forbidden so long as it is intended to disgrace others. It is natural for us to look for mistakes and faults in others in order to make ourselves feel better and powerful. Many people may not realize that backbiting is a sin. It is related that the Prophet said: Backbiting means that you say about your brother something which pains him.
Before speaking ill of others ask yourselves these two questions:
"Would I want someone revealing my faults?"
And
"Would I be saying these things if that person were here in front of me?"
Remember the old proverb that we have read and heard many times: “Do not unto others what you do not want others to do unto you.” Treat others how you want to be treated.
But if it is not intended for so or if a reasonable ground relies upon it, it is not forbidden. Muslim jurisprudents have mentioned a number of reasonable grounds for backbiting:
(1) If backbiting represents the complaint of a wronged person so as to prove his right before a judge, it is not forbidden, even if it includes the ascription of injustice and criminality to the other party.
(2) The person whose advice is sought in definite matters, such as marriage or trust, is permitted to backbite the other party –by mentioning his defects-. It is also acceptable to warn a believer against the association with deviants, by referring namely to their defects, provided that such reference is intended to protect the believer. It is also acceptable to defame a testifier when it is necessary.
(3) Backbiting is acceptable when it is intended to disavow the claim of a false lineage.
(4) Backbiting is acceptable when it is intended to refute an untrue saying or an illegal claim.
(5) Backbiting is acceptable when it takes the form of testimony against wrongdoers.
(6) Backbiting is acceptable when it is intended to forbid evil, by mentioning the defects of a person before somebody who is able to guide him.
(7) It is acceptable to backbite those who declare publicly their commitment of sins, such as the drunk and gamblers, provided that such backbiting should not exceed the limits. It is said that to backbite a sinful is not offensive.
Finally, well intention and sound objective must be proposed. Likewise, it is improper to aim at evil intentions, such as enmity, envy, and the like.
source : tebyan