The notion of a solar-powered headlight is too ridiculous to even consider, for obvious reasons. So let's move past that suggestion.
I think you'll get a weight advantage only for shorter rides which involve only a little darkness, which will allow you to carry one headlight and no backup power. For longer nighttime rides, you'll need a light that takes an external (or otherwise replaceable) battery, and you'll need to carry a spare battery - which is heavy. Or you'll need to carry two headlights, and recharge one (from a power bank) while using the other - which gets heavy. See where this is heading? The dyno setup actually involves little (if any) weight penalty over a system that will work well. And if you go with a good dyno hub (Schmidt is best), you'll give up only a few watts to drag.