Hakim al-Ummah Mawlana Ashraf `Ali Thanawi (may Allah have mercy on him) writes:
“Allah Most High has put this quality in humans that they are quickly and substantially affected by the thoughts and conditions of others.
[This occurs even] without any specific effort, and happens whether it is good or bad company.
Good company is an element of immense benefit; in the same way, bad company is an element of tremendous harm.
Good company is of such a person who, based on the need, has a grasp on the issues of Deen, and one has good faith in him. He abstains from Shirk, innovation, and worldly affairs. His actions are good, and he is firm and constant in his Salah, fasting, and other necessary acts of worship. His dealings are good and his transactions are clean. He is careful about issues of Halal and Haram. His outward behavior is also excellent. He has a humble disposition and he does not harm anyone without reason. He does not consider the poor and needy to be inferior. His inner qualities are also pleasing. He keeps the love and fear of Allah Most High in his heart. He does not keep much greed for the world in his heart. [When in] conflict with the Deen, he does not care for wealth, comfort, or disgrace. He keeps the Hereafter in front of him, and does not keep this world dear to him. He is patient and thankful in every circumstance.
If someone is found with these qualities, his company is an elixir.
If someone cannot fully recognize these qualities, for him (assistance in) recognition is to seek the pious people of his time, those who are considered by most Muslims to be pious. They should speak well (of him). And after remaining in his company several times, the heart should shy away from blameworthy traits and turn towards praiseworthy morals. Consider such a person to be pious and adopt his company.”
Hayat al-Muslimeen, p. 27 (Multan: Idara Ta’lifaat Ashrafiya)
By Brother I. Khan