All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
One should not wear clothes on which the Name of Allaah is written as this exposes it [Name of Allaah] to humiliation and entering with it to unpleasant places like the toilets. However, if the person wears such clothes is able to protect it from humiliation, then there is no harm on him to wear them.
As regards the clothes on which the word Islam or Muslim is written, there is no harm in wearing them as there in no evidence for any humiliation. The word Muslim or Islam is a common word which is used in the Quran and in people's speech, and it is not possible to absolutely say that it is from the Quran unless there is an indication which proves that, like in case when the written statement is a verse or part of a verse. Since the person who wears that shirt did not intend to humiliate this word, then there in no harm for him to wear it.
Allaah Knows best.