If you're still legally married, regardless of how long you have been separated, it would be best to disclose the information immediately. If you are divorced, I think it would depend on the pace of the "relationship." If you're casually dating, I would wait until it got a little more serious. Speaking of any kind of marriage too soon can be a deal breaker.
I was married when I met DH. Ex-husband and I had been separated for a couple of months, but for all intensive purposes over with before then, when Sister and BIL introduced me to DH. DH thought that I was married, but I informed him before we met in person that I was still married legally. It became a moral issue for him then. We discussed what happened, why had I not filed for a divorce yet, etc. I told him that I understood if he wanted to cancel our date. He appreciated my honesty. Long story short, he didn't and we have been together for four years (married for two years)!
This topic makes me wonder how does one go about bringing up that they used to be married? Do you do the serious, "We need to talk" approach or the casual, "By the way, I used to be married" approach?