You can pray while wearing shirts or t-shirts as Islam did not specify a certain dress to be worn providing that it will cover the ‘Awrah.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “The Prophet (peace and blessings be upon him) is reported to have said, “Allah will not look favorably towards a person who drags his clothes on the ground out of false pride.” Upon hearing this one of his foremost Companions, namely Abu Bakr, enquired, “But I am one of those whose clothes fall below my ankles.” Then the Prophet (peace and blessings be upon him) said, “You are not doing it out of pride!”
It is easy to conclude from this that the Prophet’s interdict against allowing one’s clothes to fall below the ankles is primarily intended to counter the pomp and flamboyancy in regards to attire that were characteristic of Arab aristocracy at that time. Strangely enough, such customs still persist among the rich and famous today as we see with Arab royalty and others who often drag their flowing robes on the ground while walking.
While condemning such habits, the Prophet (peace and blessings be upon him) intended to send a message to the Muslims that they must avoid such an extravagant and flamboyant lifestyle but should adopt the mannerisms that manifest the humility, modesty, and prudence of Islam.
It is only when we take the trouble to study the Islamic teachings in their context that we can truly appreciate the wisdom and rationale behind them. Failure to do so is no different than someone preferring to grope in the darkness, abandoning the light in his own hands. It is ironic that the Qur’an exhorts the faithful to reason and think and avoid the thoughtless behavior of brutes and pagans who simply follow the customs and conventions of their forefathers without critically examining their utility or benefit. Yet most Muslims hold onto quite irrational views about their religion.
In conclusion, the Prophet’s( peace and blessings be upon him) interdict against letting the clothes fall below the ankles was never intended for those who wear trousers, provided that one takes care not to drag them on the floor. To stretch this to imply that we must roll up our trousers taking things a bit too far. While thus seeking to apply the letter of the law, we end up forgetting the primary intent of the Lawgiver which was to teach Muslims to be pious, humble, and modest in their mannerisms and appearance, as well as in how they carry themselves.”
In addition, performing prayer while wearing half-sleeve shirt or t-shirt is OK as long as that dress is clean and does not reveal what is beneath.
May Allah bestow on us wisdom and discernment, and may He forgive us our sins.”