I think for nearly all cases, it's better to dress at least a little more formally than a company branded shirt. Also, wearing the company branded shirt will be seen as a little weird most of the time since you don't already work for the company, and very few people would expect people to be that enthusiastic for their company.
The one possible exception I can think of is if you are applying to the kind of company that actually has "fans" of a sort, and is known to be super casual. Certain very well known video game companies, for example. Another example I can think of is wearing a Google Code Jam shirt to an interview at Google. In those cases, it may even be a plus to express such enthusiasm for their company.