As to legal or not, check with your local laws. They change from state to state, That said, many old bike lights were nothing more than a mounted flashlight.
Flashlights are cheap, and there's the rub. Mounting is almost always a very mixed affair, heavy, and the patterns less than ideal. There are some very good reasons why bicycle lights aren't cheap.
Check out the links below for some great detail on what lights do what. I have the DiNotte 200 Lumen light with a AA battery pack. The great things about this light are the high quality, made in USA, and the trade in policy the company has (so if you want to upgrade at a later date you don't lose your shirt). Add the fact that you can use rechargeable AA cells and the battery holder can be bought at Radio Shack and you've got a winner. You can even check some YouTube footage of the lights in action.
Happy Trails!