Hello, Welcome to my how to. There is probably one of these already on here, but I think it helps reading a few different How to's on the same thing to get a better insight and see different techniques.
So, Here is my contribution.
Waterproof silicone sealant
People say to put them in the oven, however I used a heatgun with no problems at all
Slowly heat one side of the foglights seal, I didn't have the heatgun on full blast, had it about 2 3rds turned up, and it was a 2000 watt gun
Get a screwdriver and carefully prise and wiggle around in the seal, be patient and don't force it, if it doens't move warm it up some more.
Do the same for all 4 edges and the lens will easily fall off. Took me 5 minutes
This is the grotty inside suspect
With a stanley knife, remove all the old black sealant, well as much as you can so it give a fresh new seal
Don't go to mad, here's mine
Now, clean the inside of the glass and foglight, I have a old spray bottle with the contents of soapy water and some 2500 grit paper
Lube up the lens and rub the stone chips down and remove all contaminates. I only used 2500 grit because im tinting the foglights with lamin x, I will post a how to on this when I do it. For a really good finish use a more coarse sandpaper, really sand it down flat, and work your way up to the 2500 grit, this will remove all stone chips
I used megs scratch x to buff the glass up, again I didn' spend to long doing this as im tinting them, ideally get a machine polisher on it and really get the shine back up
And you will end up with the following article
Now, I used clear sealant, but any decent sealant will do, make sure it is waterproof
Put a nice pea thickness bead around the whole foglight like so
Insert lens, clamp it up and leave to dry. I'm leaving mine over night.
Once dry fit to your love of the life.
Hope this helps.
Don't forget the thanks button