When is the best time to stop working while pregnant?

Is no "best" time. In an uncomplicated pregnancy, there is no reason you can't work up until you go into labor. If you experience preterm labor, significant bleeding or other complications, your doctor may restrict you earlier.
Personal Decision. Usually, if you are healthy and there are no complications in your pregnancy, most women can keep working up until they deliver. It is actually beneficial to stay active and may help you have an easier labor. However, there may be some restrictions put on your activity if you are having any pregnancy complications. You should ask your doctor about your individual case.