I had the same thing happen to one on my wife's NB.
The first thing you need to do is dig out all of the old sticky gunk left on the lens and on the headlight itself.
Then get a tube of gray colored silicone adhesive caulking that you can apply with a caulking gun.
Lay in a good thick even bead all around the light fixture. Once you dig out the old gunk you'll see the groove that needs to be filled.
Then, apply the lens back onto the headlight very carefully and put several spring clamps around the lens to keep pressure on it while the caulk cures. Leave it at least overnight until it completely cures and you'll have a tight waterproof seal once again.
Just be sure to place the lens on real well in one shot. Otherwise, if you pull it out again, you'll end up with a gooie mess and you'll have to start over again and it won't be easy.
Good luck
