You need at least 6 volts at the head light bulb in order to get decent lighting. The dimmer switch is the most likely culprit for reducing the voltage. Try operating it several times while checking the voltage at the bulb. If the voltage comes up to around 6 volts, you will either have to replace the dimmer switch or disassemble it and clean the contacts.
If you have a volt meter and know how to use it, I can describe the voltage drop checking procedure to use for isolating the poor connection.