Ideally, use both regular and flashing taillights. Very strong headlights gain you a lot of respect because at a distance, people think you are riding a motorcycle. Don't ride on sidewalks, parks, and pedestrian zones where riding is not legal, or if you must, ride at walking speed. The best front lights I know are made by Lupine. Unfortunately it is now hard to find because it seems to violate some traffic regulation, and Cateye has sued them.
Bicycles have the advantage of being able to go anywhere and be parked anywhere, unlike cars.
While a stolen bicycle is usually less of a loss than the damage done when a car is broken into, a bicycle is much easier to steal unless properly locked. Forget spoke locks, cable locks, combination locks, or simple chains. I prefer motorcycle locks by Abus or Trelock that consist of a steel cable protected by interlocking rings. The idea is that you need two sets of tools, a saw for the rings and a bolt cutter for the cable. Of course, you need to lock the bicycle to something that is at least as solid as the lock.