The dress code depends on the lab or company you work for. If you work in a clinical setting with cells, for example, you often need to wear lab coats to promote a sterile work environment. You also will need to wear closed-toe shoes, long pants, and ensure that your skin is covered to prevent injury to yourself.
If you work in a more calculations-based lab, you might spend your days mostly on the computer and be able to wear whatever you like. Again, the dress code varies from lab to lab, company to company, and is dependent upon workplace culture and the sterile needs of the experiments you are involved in.