Man is a social animal and cannot live without other human beings. Apart from our family, we spend most of our time with friends. This friendship starts at school. When a child joins a new group of people, he gets attracted to people of a similar nature. This peer relation begins from here and continues till death. The status of friends changes from school to office colleagues over time. Still, it remains intact.
Islam is a complete code of life that guides you about all the aspects of life. Then, do you think that religion will ignore to guide you about your company? To whom befriend? Surely Not. What attributes a friend must possess to be called your close friend? Islam provides complete guidance about this.
No one can deny the importance of friends. These are the people that can change you in a few minutes. They are aware of how to agree on you for a party? They know your strengths and weaknesses. They are your energy boosters who can change your mood with just words. Islam acknowledges the importance of friends and guides you about who should be your energy booster?
According to your religion, a person believing in one God and prophethood of Holy Prophet (PBUH)should be your friend. The God-fearing person can be a fantastic secret keeper. Holy Quran and Sunnah give you the perfect idea of a good friend by characterizing all the qualities of a good companion.
"And keep yourself patient [by being] with those who call upon their Lord in the morning and the evening, seeking His countenance. And let not your eyes pass beyond them, desiring adornments of the worldly life, and do not obey one whose heart We have made heedless of Our remembrance and who follows his desire and whose affair is ever [in] neglect”. (Surah Al Kaaf verse 28)
It is very clear from this verse of the Holy Quran that your friend should believe in Allah and He must be one of those who follow the orders of Allah. It is a common experience that you perform activities that your friends are performing. Good friends can change your code of conduct and manners towards positivity and vice versa.
A university girl told her experience that she got admission to the university and by chance joined the group of good Muslim girls. After a short time, she started offering Salah just because her friends were doing so and she had nothing to do while her friends were busy performing Salah. Similarly, your company can lead you towards good or bad depending on their nature. Holy Prophet (PBUH) narrated:
"A man is upon the religion of his friend, so let one of you look at whom he befriends.” (Jami` at-Tirmidhi 2378)
As a good friend can lead you towards a good connection and strengthen your bond with Allah, a bad friend can mislead you. He can take you away from the religion in various ways. Let me give you an example. If you and your friends are watching a movie. It is the time of offering prayer and you want to offer Salah but your friends drag you to watch the next two scenes. Meanwhile, you will have missed the Salah. Constant missing Salah will make you lose your habit of offering Salah.
"And ˹beware of˺ the Day the wrongdoer will bite his nails ˹in regret˺ and say, “Oh! I wish I had followed the Way along with the Messenger! Woe to me! I wish I had never taken so-and-so as a close friend. It was he who truly made me stray from the Reminder after it had reached me.” And Satan has always betrayed humanity".
Sometimes, people find it difficult to practice religion in front of their friends. It is possible to involve religion in your actions and conversation only when your friends are of the same mindset as yours. Although choices and differences of opinion make friendship challenging and diversified, at least the core value should be similar.
"Do not accompany except a believer, and do not serve your food except to one with Taqwa."
On the day of Judgement, you will be answerable for your good and bad actions. Your good actions will be helpful for you in the future. Why not your best friend should be a way of connection to Allah? Why both of you must not accompany in Jannah in the similar way you accompany each other in Dunia?
"A man shall be with whomever he loves, and you shall be with whomever you love".
If you have joined the company or bad friends, no need to worry. You can slowly try to leave them and keep praying to Allah for help. Choosing the path of Allah will be difficult in the beginning but Allah will bless you with his blessings. Peace of mind will be your best gain for what you will be thankful for later.