Allah says in order to achieve mercy, you should establish your prayer, you should give from what Allah has given you and you should follow the messenger. If you do these three things you will achieve the mercy of Allah.
And establish prayer and give zakah and obey the Messenger – that you may receive mercy. (24:56)
In surat al-furqan Allah Subhanahu WA Ta’ala makes mention of many factors, the ability and the capacity to distinguish between right and wrong. When we’re in good company and when we are trying to obey Allah and Allah’s instructions we will definitely be able to distinguish between right and wrong.
And the Day the wrongdoer will bite on his hands [in regret] he will say, “Oh, I wish I had taken with the Messenger a way. Oh, woe to me! I wish I had not taken that one as a friend. He led me away from the remembrance after it had come to me. And ever is Satan, to man, a deserter.” (25:27-29)
Your circle of friends makes you or breaks you. It’s up to you to decide what you’d like. Make sure you have friends who are better in values and morals than you, their relationship with their maker than you.
Who are the blessed, who are the worshipers of the most merciful?
And the servants of the Most Merciful are those who walk upon the earth easily, and when the ignorant address them [harshly], they say [words of] peace. (25:63)
وَالَّذِينَ يَقُولُونَ رَبَّنَا هَبْ لَنَا مِنْ أَزْوَاجِنَا وَذُرِّيَّاتِنَا قُرَّةَ أَعْيُنٍ وَاجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا – 25:74
Waallatheena yaqooloona rabbana hab lana min azwajina wathurriyyatina qurrata aAAyunin waijAAalna lilmuttaqeena imaman
And those who say, “Our Lord, grant us from among our wives and offspring comfort to our eyes and make us an example for the righteous.” (25:74)
Those will be awarded the Chamber for what they patiently endured, and they will be received therein with greetings and [words of] peace. (25:75)