In this article we’ll use a Yamaha YZ250F as an example since it’s a very common dirt bike.
Since its enduro brother, the WR250F, has lights on it (’03 and newer), you can interchange parts with these bikes. The first option is to get a stator and CDI box from a WR250F and swap them. The reason for this is because the stock YZ250F stator is not strong enough to power a headlight; it’s only meant for the ignition since it’s a motocross bike.
Another fairly simple way to put a headlight on your dirt bike is to get an aftermarket high output stator coil. Like I mentioned before, motocross bikes aren’t meant to power lights, so you need more juice. A regulator should be used in addition so that you don’t blow a bulb from too high of a voltage.
Instead of getting a stronger stator, install a 4AH gel-cell battery on your dirt bike. The most common and usually easiest location to put one is in the air-box. It only weighs a few pounds and works well. The downside is that the battery will only last about an hour or two on a full charge, then requires a charge by an external AC charger. It can be a little annoying having to charge it after every ride, but it’s fairly cheap and can save your butt if you happen to get stranded on the trails after dark. I recommend using it a few times before you go on a trail ride at night. This will give you an idea as to how long the battery will last so you know when to head back.
–Tom Stark, Motocross Hideout
If you don’t have another dirt bike that you cannot swap headlights from, you’ll have to get an aftermarket headlight assembly. It will come with instructions so you can install it yourself.
Headlight install video from Trail Tech.