At idle, the alternator is putting out just enough current/voltage to not drain the battery. With the headlights on, it's not enough to carry the full load so the lights are not as bright. Pretty normal as long as the alternator has the correct output. Stop by your local parts store and have them test it. They can do a load test with it on the car for current and voltage.