In academia, the dress code is much more relaxed than in business settings, but there are exceptions in certain fields. But overall, people care less about what you wear, and more about what you have to say. (And I must, I quite like it.)
The dress code in most academic events (conferences included) is often called “academic casual”, and is not very strict. If you want to be sure to avoid any gaffe, just stay away from the short pants and T-shirts (overly casual), as well as full suits and ties (overdressed). So, long pants (may want to avoid blue jeans), a shirt (or other top with collar), possibly a decent sweater.
Regarding women's attire, in addition to the choices above, pantsuits are fine, dresses and skirts (not short enough as to be provocative!) are also okay, but again do not overdress.
Regarding various fields: I have noticed that researchers at physics conferences are usually more casual than chemists and chemical engineers. Others will surely comment about their own field(s)…
One exception I am aware of: law conferences usually follow a more business dress code, rather than casual.