I just did this --- it's very easy. The best thing to do is buy new BMW connectors + wires for the headlights, solder some spade connectors (get 'em at Walmart) onto the ends, and plug 'em straight into your factory wiring harness. No cutting required, no damage to your factory stuff, just plug 'n' play.
There's a Lighting subforum at R3VLimited.com - lots of good info there - rather than duplicating it here.