On the 225 it could be a bad stator..since there is a pulse coil to generate power for the ignition and a pulse coil to generate for the lights and charging..
If there is a cross between the two circuits then turning on the headlamps may be pulling the voltage off the ignition coil..killing your engine.
I'd start with the manual that Barnett has given a link to and a volt meter..check the stator and move up the harness. You've find a short to ground in there somewhere!!
Do the lights turn on when the switch is flipped..even briefly before the engine dies?
Current toys..
1986 Honda 350X..trail bomb!
1985 Honda 250SX..my main mudder
1985 Honda 250ES..Back in Black Trike
Current non-trike toys:
1990 Honda TRX300FW
1995 Seadoo GTX
1998 Polaris Indy Lite 340(Nearly new looking)
1998 Polaris Touring 500
1998 Club Car (electric)