Klem is spot on, there is current passing across, happens in salt water , usually evidenced by the led glowing low, and the torch cannot be turned off, leave it on until you can wash it in fresh water
Corrosion happens with some torches that use both alloy for head and battery holders , a very common problem as its only the anodizing that providing insulation, when this is broken the outside of your torch head is active
The Ultrafire W300, some Ugly lights, and now the newer 1400 Lumin Xm-l AKA BG-Q88 being sold on Ebay and on DX as a Fandyfire will rapidly corrode in salt water when turned off, once they are turned on you can see the little gas bubbles stop.
Theres a fellow on Ebay trying to sell a kit to fix this problem for $25
My experience is that there is no 1 simple fix, sometimes a small oring on the pill is enough, or super glue or heatsink compound on the threads between the pill and body is enough to achieve an open circuit
If corrosion continues I've seen it weld the pill , head and battery case together, after only 1 very expensive dive