To both see and be seen, it's better to have two forward-facing white lights, each using a separate power system. If you rely on only one light, or two lights powered by the same source, a malfunction could leave you nearly blind.

One good setup is to have a handlebar-mounted light to see where you are steering, and a helmet-mounted light to see anywhere you choose. To be really noticeable, put a flashing white light on the handlebar also, if it's legal. Continually flashing lights (for general safety use by vehicles) are illegal in California and other places, even though lights with the ability to flash are sold there.

I suppose that you could buy a waterproof flashlight or floodlight that takes standard batteries, plus some rechargable batteries and a charger. If you use a couple of elastic cords to secure the light to your handlebar and stem, then you might have an acceptable light for a good price. You can mount flashlights using these holders also:

At a bike shop, you can get fairly inexpensive lights designed to mount on your handlebar and which use standard batteries, perhaps four AA cells.

Handlebar-mounted battery-powered headlight

I have used a couple different brands of these. They are very convenient to attach to, and remove from, a handlebar. Too bad that the amount of light they produce is really inadequate (for me). Based on this limited experience, I suggest: though it's tempting to save money, don't waste your time trying to get by with these lights. However, if you already own such a light, you could use it as a backup light in case your other light fails.

The more powerful and expensive lights often come with a separate light housing and battery pack. They are designed to attach and detach quickly.

High beam headlight Battery for headlight

This one also comes with a control switch.

Handlebar-mounted control switch for headlight

If you are curious about how good a particular brand of light is, check the web for the opinions of actual users:

Based on those reviews, I bought the Passubio model of light, made by Lupine. That's the light shown in those photos above. For a single halogen light, it's quite bright; I bike nearly at full speed at night. It does not just have an on-off switch; among other things, you can set it to have several brightness settings (one for maximum brightness, a dimmer one to avoid blinding motorists, another for conserving power, etc).

To learn more or buy a Lupine light:

When I drive a car in daylight, I have the headlights on. This is a safety precaution. If another driver looks quickly and carelessly before cutting across my path, they are more likely to notice me. The same benefit occurs if I bike with a light always on, especially because I'm less noticeable on my bike than in a car. But I'm too lazy to attach my handlebar-mounted light except at night.