Some night clubs are very strict with the dress code and they would not allow casual clothes such as sweatpants, capri or shorts or sneakers. These are the high end night clubs that are mostly located in the Ortakoy area. Some examples are Reina and Crystal. There are some other hip and fun night clubs in the Taksim area where the dress code is more casual.
If you are just looking for a drink and a bit of dancing in Beyoglu or the surrounding areas, than there isn't really a dress code beyond looking clean and well-kept; the same you'd wear to go out to a normal dinner in the states or whatever. Most people don't look to self-conciously "dressed up", although you'll probably notice a few super-hipsters.
For actual "Dance Clubs," like the ones up the coast like Reine and the like, there is absolutely a dress code that consists of looking like a millionaire. Jeans and a tee-shirt are totally cool, as long as they look like you spent 500 dollars on each. Basically, you need to demonstrate that you can afford the drinks (20tl and up), and that you dressed specifically to go clubbing.
As a protip, a lot of the clubs maintain restaurants as well, with patrons free to dance afterwards. That's a traditionally easier way to get in than waiting in line or having to convince security that you really are, in fact, a shipping magnate.