'87's have a seperate lighting coil for the headlight. The headlight won't operate unless the engine is running, and light output will vary with RPM just as you're experiencing.
This is normal. The headlight system is completely independent of the bike's charging system and provides its own power. Only the tail and dash lights come on when the key is switched to "on". The '87 also has no front running lights and a 1-year CDI. Slightly different critter from the later bikes.
In addition to that the full charging system output doesn't really "kick in" on those early bikes 'til above 2,000-3,000 RPM and drops off to berely maintenece level at idle, which could be what you're seeing. So when diagnosing them take your voltage measurement at the battery under revs. If you're seeing anything near 13.5 volts at high revs your system is functioning normally.