In an ideal world, use both. A wide beam light on the handlebar keeps the light on the road in front of you, even when your viewpoint changes, which can save you if an obstacle comes up in front of you in a hurry.
However, if the trail curves sharply, and your light is fixed to the handlebar, then the light can be pointed in the wrong direction, which can have the opposite effect.
Adding a helmet mounted light ensures that you have light where you are looking, i.e. down the trail.
This can be expensive, but it is the best choice.
Barring that option, use a bar mounted light with a bright, wide beam. It is more important to keep light on the ground in front of the bike, that off the trail where your viewpoint might be focused, and a helmet mounted light can be more annoying to other riders.
Just my 2 cents.