There are certain types of speech which we must refrain from, like the speech the Prophet (SallAllaho Alaihe WaSallam) stayed away from.
The Muslim has to control his tongue and not speak unless he says something good.
It is narrated from Hadhrat Abu Hurairah that Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam) said: “Whoever believes in Allah and the Last Day, let him speak good or else keep silent …” (Bukhari and Muslim)
Imam Nawawi said: “If he wants to speak, then if what he wants to say is good and he is confident that he will be rewarded for it, whether it is obligatory or praiseworthy, then let him speak, but if it does not seem to him that it is good and he will be rewarded for it, then let him refrain from speaking, whether he thinks it is Haraam (impermissible) or Makrooh (disliked) or Mubaah (permissible). Based on this, it is recommended to refrain from saying permissible words and we are enjoined to avoid this, lest it lead us into something that is Haraam or Makrooh, which is what happens in many cases or in most cases. Allah (Subhaanahu Wa Ta’aalaa) says (interpretation of the meaning):
مَّا يَلۡفِظُ مِن قَوۡلٍ إِلَّا لَدَيۡهِ رَقِيبٌ عَتِيد ٌ [ق: 18]
“Not a single word is uttered by one but there is a watcher near him, ready (to record).” (Qaaf 50:18)
Imam al-Shafi’i understood the Hadeeth (Narration) to mean that if a person wants to say something, he should think about it: if it seems to him that it will not do any harm, then he should speak, but if he thinks that it will do some harm or he thinks that this is most likely, then he should refrain from speaking.”
The Prophet, Hadhrat Muhammad (SallAllaho Alaihe WaSallam), commanded us to control our tongues in more than one Hadeeth, such as that narrated by Hadhrat ‘Uqbah ibn ‘Aamir, who asked the Prophet (SallAllaho Alaihe WaSallam): “What is salvation?”
He said: “Control your tongue, keep to your house and weep over your sin.” (Tirmizi)
It is also reported that the Prophet (SallAllaho Alaihe WaSallam) said to Hadhrat Mu’aaz, after teaching him some of the laws of Islam: “Shall I not tell you what is the foundation of all that?”
He said: “Of course, O Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam)!”
The Prophet (SallAllaho Alaihe WaSallam) took hold of his tongue and said: “Control this.”
He said: “O Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam)! Will we be held responsible for what we say with it?”
The Prophet (SallAllaho Alaihe WaSallam) said: “May your mother be bereft of you, O Mu’aaz! Will the people be thrown into Hell on their faces or on their noses for anything other than the harvest of their tongues?” (Tirmizi)
The Hadeeth enjoins refraining from indulging in specific things, because this is something that is of no benefit to a person, and indeed it may cause him a great deal of harm in his spiritual and worldly affairs.
Hadhrat Ibn Mas’ood reported that the Prophet (SallAllaho Alaihe WaSallam) said: “If my Sahaabah (Companions) are mentioned, then keep quiet; if the stars are mentioned, then keep quiet; and if the divine decree is mentioned, then keep quiet.” (Al-Tabarani)
This Hadeeth indicates that it is not permissible for a person to speak badly of the Sahaabah of the Prophet (SallAllaho Alaihe WaSallam), and that he should keep quiet about the disputes that occurred among them, because speaking badly of them or criticizing them implies that one is rejecting what Allah (Subhaanahu Wa Ta’aalaa) said about them in the Quraan, where He praised them by saying (interpretation of the meaning):
وَٱلسَّٰبِقُونَ ٱلۡأَوَّلُونَ مِنَ ٱلۡمُهَٰجِرِينَ وَٱلۡأَنصَارِ وَٱلَّذِينَ ٱتَّبَعُوهُم بِإِحۡسَٰنٖ رَّضِيَ ٱللَّهُ عَنۡهُمۡ وَرَضُواْ عَنۡهُ وَأَعَدَّ لَهُمۡ جَنَّٰتٖ تَجۡرِي تَحۡتَهَا ٱلۡأَنۡهَٰرُ خَٰلِدِينَ فِيهَآ أَبَدٗاۚ ذَٰلِكَ ٱلۡفَوۡزُ ٱلۡعَظِيمُ [التوبة: 100]
“As for the first and foremost of the Emigrants (Muhajirin) and the Supporters (Ansar) and those who followed them in goodness, Allah is pleased with them and they are pleased with Allah, and He has prepared for them gardens beneath which rivers flow, where they will live forever. That is the supreme achievement.” (At-Taubah 9:100)
And Allah (Subhaanahu Wa Ta’aalaa) says (interpretation of the meaning):
مُّحَمَّد ٌ رَّسُولُ ٱللَّهِۚ وَٱلَّذِينَ مَعَهُۥٓ أَشِدَّآءُ عَلَى ٱلۡكُفَّارِ رُحَمَآءُ بَيۡنَهُمۡۖ تَرَىٰهُمۡ رُكَّعٗا سُجَّدٗا يَبۡتَغُونَ فَضۡلٗا مِّنَ ٱللَّهِ وَرِضۡوَٰنٗاۖ سِيمَاهُمۡ فِي وُجُوهِهِم مِّنۡ أَثَرِ ٱلسُّجُودِۚ [الفتح: 29]
“Muhammad is the messenger of Allah, and those who are with him are hard on the disbelievers, compassionate among themselves; you will see them bowing down in Ruku‘, prostrating themselves in Sajdah, seeking grace from Allah, and (His) good pleasure; their distinguishing feature is on their faces from the effect of Sajdah (prostration).” (Al-Fath 48:29)
This is how Allah (Subhaanahu Wa Ta’aalaa) has described them in His Book, so no doubt they are of just character and are the best and greatest of mankind. So no one hates them but a hypocrite and no one loves them but a believer.
In Majmoo’ al-Fataawa, 3/152, Ibn Taymiyah said: “One of the basic principles of Ahl al-Sunnah wa’l-Jama’ah (followers of prophetic tradition) is that they think and say nothing to criticize the Sahaabah of the Messenger (SallAllaho Alaihe WaSallam), as Allah (Subhaanahu Wa Ta’aalaa) has described them in the Aayat (Verse) in which He says (interpretation of the meaning):
وَٱلَّذِينَ جَآءُو مِنۢ بَعۡدِهِمۡ يَقُولُونَ رَبَّنَا ٱغۡفِرۡ لَنَا وَلِإِخۡوَٰنِنَا ٱلَّذِينَ سَبَقُونَا بِٱلۡإِيمَٰنِ وَلَا تَجۡعَلۡ فِي قُلُوبِنَا غِلّٗا لِّلَّذِينَ ءَامَنُواْ رَبَّنَآ إِنَّكَ رَءُوف ٌ رَّحِيمٌ [الحشر: 10]
“And for those who came after them saying: ‘Our Lord, forgive us and those of our brothers who preceded us in faith, and do not place in our hearts any rancor against those who believe; Surely, Our Lord, you are Very-Kind, Very-Merciful’.” (Al-Hashr 59:10)
And they obey the command of Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam): “Do not curse my Companions, for by the One in Whose hand is my soul, if any one of you were to spend the equivalent of Mount Uhud in gold, he would not reach the status of one of them, nor even come half way.’ (Agreed upon)
Hadhrat Abu Zaraa’ah said: “If you see a man criticizing any one of the Sahaabah, then know that he is a heretic, because the Quraan is true, and the Messenger is true, and what he brought is true, and no one conveyed all of that to us but the Sahaabah. So whoever criticizes them means, in effect, to say that the Quraan and Sunnah (prophetic teachings) are false, so it is more appropriate that he should be criticized and ruled to be a heretic who is misguided.”
With regard to the second part of the Hadeeth, which enjoins refraining from speaking about the stars, what is referred to by that – and Allah (Subhaanahu Wa Ta’aalaa) knows best – is seeking guidance by the stars concerning matters that are unseen, as the people of the Jahiliyyah (pre-Islamic days of ignorance) used to do by means of astrology, such as using the movement of heavenly bodies to indicate when certain earthly events would occur, such as the blowing of the wind, rainfall, changes in prices, and other matters which they claimed to know from the movements of heavenly bodies. They used to say that whoever got married under a particular star, then such and such would happen to him, or whoever traveled under a particular star, such and such would happen to him, and whoever was born under a particular star would be lucky or unlucky, etc.
With regard to the third part of the Hadeeth, which refers to refraining from speaking about the divine decree (al-qadar), Abu Ja’far al-Tahaawi said: “The divine decree is a secret known which Allah (Subhaanahu Wa Ta’aalaa) has hidden from His creation. No angel who is close to Him and no Prophet whom He sent knows that. Pursuing such matters only leads to failure and deprivation of the mercy of Allah (Subhaanahu Wa Ta’aalaa), and it leads to injustice, so beware of looking into the matter, thinking about it and wondering about it. Allah (Subhaanahu Wa Ta’aalaa) has kept knowledge of His decree from His slaves, and has forbidden them to pursue the matter, as He says in His Book (interpretation of the meaning):
لَا يُسَۡٔلُ عَمَّا يَفۡعَلُ وَهُمۡ يُسَۡٔلُونَ [الأنبياء: 23]
“He is not questioned of what He does, and they are questioned.” (Al-Anbiyaa 21:23)
So whoever questions what Allah (Subhaanahu Wa Ta’aalaa) does has rejected the ruling of the Book, and whoever rejects the ruling of the Book is a Kaafir (disbeliever).” (Sharh al-‘Aqeedah al-Tahaawiyyah)
So the Muslim has to submit to Allah (Subhaanahu Wa Ta’aalaa) in all His affairs, and know that whatever happens to him could never have missed him, and what misses him could never have happened to him. There is a lot that may be said on this topic. May Allah (Subhaanahu Wa Ta’aalaa) bless the man who believes in the will and decree of Allah (Subhaanahu Wa Ta’aalaa) without indulging in philosophical discussion about the matter.