it would be possible to write something that set the badge but it would be an estimate. there wouldn't be a way to push the actual percentage from the phone after closing the app. it would start w/ the phone's percentage and push estimated values. not really helpful.
If you own a 3GS, go to Settings > General > Usage and turn on Battery Percentage. It's not an app, but that's the best way to get the percentage without jailbreaking on a 3GS.