I had this issue, and it's because the bolt is screwed into a plastic lug inside the light unit. This lug breaks and the bolt just spins. I spent ages trying to grip the bolt with pliers/mole grips whilst loosening the bolt. Eventually I managed to grip the thread from outside the light unit through the rubber seal and I'm screwed it. I then repaired the lug as a temporary measure and bought a replacement unit off eBay (common part across a few bikes) although the temporary fix has half so I'll swap it at the next bulb change.
What I did do when I refit the nut, was cover the threads with ACF50 corrosion block so am hopeful this'll come off easier.
Good luck with it, as it was a pain to remove. (If I was doing the above again, I'd be tempted to just buy a replacement and break the lense on the one stuck there - that's how much of a pain it was!)