The rheostat on the switch that controls the brightness of the dash lights is most likely dirty or corroded and just needs a little cleaning up.
Get some contact cleaner from Radio Shack or any electronics store, spray a little on the wire-wound rheostat that is on the front of the headlight switch body (closest to the dash) then "wipe" the switch back and forth several times. Repeat as necessary.