This would be an easy thing to implement. Rain sensors already exist for automatic wipers, so it would make sense to use these (if you're fitting the sensor, it may as well do the wipers as well as the hood).
There would be no weight penalty, as it would all work from the car's software. If the car already has an electric hood, then it would be quite a simple job to set it up to close it when the ignition is off, and the car is stationary. An override switch might be useful, but I doubt it. Battery drain isn't a huge consideration: modern cars guzzle power anyway when they're switched off. I can't imagine it using any more power than, say, an ultrasonic alarm system.