Possibly a bad cell in the battery? My bike died at a stoplight last weekend, i pushed it over to an alternator shop and we hooked up a charger to the battery, it was dead and couldnt hold a charge. Right before this, my bike did the same thing (light would go dim at an idle, and go brighter when i reved it). I was TOLD the battery in it was new by the guy i bought it from. We put a new battery in it, then started the bike and hooked it up to his voltage meter to see if my charging system worked (got the RPM's up and saw that it was charging the battery). Ever since then i havent had an issue with the lights going dim. The dude at the shop said it was a bad cell (one of the cells was completely void of water). Sounds like your charging system is working cause when you rev the engine the headlight gets brighter, maybe you just either need to fully charge your battery or get a new one. This is coming from someone who dont know much about bikes, but im trying to learn.