Can You Pray Whilst Wearing Clothes With Writing on them?
Question

Is it permissible for us to wear shirts which have text on back of it while praying with the imam.
Praise be to Allah.The ruling on wearing clothing on which there are kinds of images, writing and patterns is subject to further discussion. 

If these images are of prohibited things , such as pictures of women, crosses, symbols of nations that are hostile towards Muslims, or they are drawings of animate beings, or images of prohibited things such as alcohol and cigarettes and the like, then it is prohibited to wear them in the first place, and the prohibition on praying in them is even more emphatic. Because these images are prohibited in and of themselves, it is not permissible to wear garments with them , according to the more correct of the scholarly opinions. 


If these garments do not have any images, but they have some words and phrases that call to sin, such as the words “Kiss me” or “Follow me”, and so on, or similar words that are used by those who promote immorality, or words that promote corrupt beliefs, then it is also prohibited to wear them outside of prayer, so wearing it when praying is even more forbidden. The reason for the prohibition is obvious, because it involves indecent words and is a visible evil; it is also a call to evildoing or disbelief, and Allah says (interpretation of the meaning):

“O you who believe! Follow not the footsteps of satan. And whosoever follows the footsteps of satan, then, verily he commands Al-Fahsha’ [i.e. to commit indecency (illegal sexual intercourse)], and Al-Munkar [disbelief and polytheism (i.e. to do evil and wicked deeds; and to speak or to do what is forbidden in Islam)].” [An-Nur 24:21]

If the garments in which one is praying are free of images or prohibited words, but they have decorations or shapes or other words, the ruling on them depends: 


If they are things that catch the eye and one thinks it most likely that they will distract the worshippers who see them and make them think too much about them, then it is disliked to pray in these garments, because it is proven that the Prophet (blessings and peace of Allah be upon him) forbade anything that will distract one when praying, as it says in the Hadith of `A’ishah (may Allah be pleased with her):

The Prophet (blessings and peace of Allah be upon him) prayed in a garment that had markings, and he glanced at its markings. When he finished praying, he said: “Take this garment of mine to Abu Jahm, and bring me the plain garment of Abu Jahm, because it distracted me just now when I was praying.” 
The Hadith was narrated by Al-Bukhari in his Sahih (373), where he included it under a chapter heading: If a person prays in a garment that has markings and looks at its markings. And it was narrated by Muslim in his Sahih (556), where Imam An-Nawawi (may Allah have mercy on him) gave it the title: Chapter: It is disliked to pray in a garment with markings. 
Al-`Allamah Ibn Daqiq Al-`Id (may Allah have mercy on him) said: 
“From this report the jurists deduced that anything that may distract one from praying of colours, decorations and artefacts is disliked. The ruling is general in application because the reason for it is general, and the reason is distraction during prayer.” (Ihkam Al-Ahkam, p. 219) 
Al-Qurtubi (may Allah have mercy on him) said: 
“In this Hadith, we see that there are some reservations about everything that could distract one in prayer by looking at it.” (Al-Mufhim lima Ashkala min Talkhis Muslim, 2/163)                                     
Ibn Qudamah (may Allah have mercy on him) said:
“Everything that may distract the worshipper from his prayer is disliked… If the Prophet (blessings and peace of Allah be upon him) – despite the infallibility and focus in worship that Allah bestowed upon him – was distracted by that, then it is more likely in the case of other people.” (Al-Mughni, 2/72) 
Al-Bahuti Al-Hanbali (may Allah have mercy on him) said: 
“It is disliked to face that which will distract him because it will keep him from praying properly.” (Kashshaf Al-Qina`, 1/307)

But if those decorations and words – so long as they are not prohibited – are insignificant and the worshippers will not pay attention to them, or if there are things that people usually have on their clothes in such a way that they will not distract the one who looks at them, then it is not disliked to pray in them because the reason for it being disliked is not present in this case. 

Harb (may Allah have mercy on him) said: 
“I asked Ishaq about praying on a cloth – What do you think about praying on a cloth with green markings and stripes?
He said: It is permissible.” (Fat-h Al-Bari by Ibn Rajab, 2/206)
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said: 
“If we assume that the imam will not be distracted by that because he is blind or because this is something that he has seen many times, to the extent that he does not care about it or pay any attention to it, then we think that there is nothing wrong with him praying on it.” (Majmu` Al-Fatawa, 12/362)
To sum up, if the shirt asked about includes writing that is not prohibited but it attracts attention and distracts the worshippers who look at it, then it is disliked to pray in it in that case, otherwise it is not disliked. 
But if the writing carries prohibited meanings, it is not permissible to wear it at all, whether outside the prayer or when praying. 
For more details, please refer to the following answers: 83154 , 193559 , 161222 , and 151476 .
And Allah knows best.