Why are battery-powered lights so popular?
The main advantage, in my view, is that you can more easily add/remove battery-powered lights.

Why this may be desirable:


Theft resilience. I take my lights off the bike and carry them with me if I'm parking my bike outdoors for longer than a few minutes. Caveats: This can be more of a downside than a benefit, depending on your situation. (I can't imagine a thief taking the time to steal a generator-powered light, but I'm sure it happens sometimes.)
Flexibility. I don't bother to take my lights with me unless I know I'm possibly going to need them. If I used a generator-powered light, I would be pretty much stuck with it all the time, even if I'm only going to ride during the day. Caveats: This is, however, not much of a positive thing, unless the lights you use are particularly heavy, or you happen to be a "weight weenie".
Interchangeability. I can swap my lights between my bikes very easily. Most decent battery-powered lights have an adjustable removable clamp that you can use to attach the light to any style of handlebar/seat post/other tube that you could possibly want. This means that I only need one set of lights that I can use between all of my bikes. Caveats: If you don't like to spend an extra 5 minutes swapping your lights every time you want to ride a different bike, this is not a plus.