In most cases, it's perfectly safe to drive in the months leading up to the end of your pregnancy. However, if you feel that you're not able to concentrate at the wheel, or driving makes you uncomfortable, then give it a pass. When driving, it's very important that you position your lap belt directly under your belly (see How to wear a seat belt), to ensure that there is no danger to your baby if you are involved in an accident.
Traveling by public transportation is fine, too, but make sure you take full advantage of your condition to pointedly request a seat. Being jolted around on a train or bus is not ideal-not because it will damage your baby, but because your center of gravity has changed and you are more likely to fall or experience embarrassment and discomfort. Long periods of standing can also cause your ankles and feet to swell.
If you're feeling uncomfortable or dizzy, get off the train or bus and sit down in a cooler environment, preferably with your feet up, for about 20 minutes. Always carry water with you when you're out.