Praise be to Allaah.
The ruling on wearing clothing on which there are kinds of images, writing and patterns is subject to further discussion.
Firstly:
If these images are of haraam 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 haraam things such as alcohol and cigarettes and the like, then it is haraam to wear them in the first place, and the prohibition on praying in them is even more emphatic. Because these images are haraam in and of themselves, it is not permissible to wear garments with them, according to the more correct of the scholarly opinions.
Secondly:
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 haraam 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 kufr, and Allah says (interpretation of the meaning):
O you who believe! Follow not the footsteps of Shaitaan (Satan). And whosoever follows the footsteps of Shaitan (Satan), then, verily he commands Al-Fahsh [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)]
[al-Noor 24:21].
if the shirt asked about includes writing that is not haraam but it attracts attention and distracts the worshippers who look at it, then it is makrooh to pray in it in that case, otherwise it is not makrooh.
But if the writing carries haraam meanings, it is not permissible to wear it at all, whether outside the prayer or when praying.
And Allah knows best.