It may be a bad diode in the diode board, though there are some more "subtle" failures which could also cause this to happen with the key switch off. The key switch itself should turn off power to the gen light/voltage regulator/rotor excitation circuit with the key "OFF". If you are able to turn off & remove the key, and have the light(s) remain on (is it just the GEN light, or do other dashboard lights work?) it is possible that there may be something faulty with the switch, or it hasn't been wired correctly. Has any work been done to the bike recently?
Does the light ever go off after you've started the bike and get the revs over 2000 rpm or so? Or, perhaps the battery is pretty much drained by morning?