I'd expect an impact, but not because of the dress code itself.
Programmers, especially the brilliant kind, are often peculiar creatures, and many of them don't go well with rules they consider arbitrary. People have written whole blogfuls about this, but the gist is that if you put arbitrary constraints upon a programmer, chances are they will stall, and their productivity will plummet.
Now, for roles where meeting clients in a formal setting is part of the job, dressing appropriately can be expected, and any programmer equipped with rudimentary social skills will comply, because it makes sense - if they don't, explain how wearing a suit and tie makes you look impressive and serious, and how that's helpful in selling the product and creating a relationship of trust. If you can make that argument, you probably won't need any explicit rules.
OTOH, if you can't explain to an intelligent person why the formal attire is needed, then chances are it is in fact arbitrary - maybe it makes you feel better, or someone in upper management; maybe it's just always been like this and nobody has ever given it much thought; but if you try to enforce such a rule without being able to explain why, your programming staff's morale will suffer.
It's not just dress codes: any rule you impose that is perceived as arbitrary, or worse, counter-productive, unfair, or overly restrictive, will yield the same productivity-killing result.