It happened to almost everyone at one time or another, something electrical fails to work and the culprit is a little corrosion on the contacts. To clean those dirty contacts on signals, stop lights, tail lights and trailer connectors use approximately 1 ounce of cider vinegar and add a little table salt. Apply the cleaner with an acid brush or similar applicator and when the contacts are clean rinse with water (a spray bottle works well for this). Dry the contacts thoroughly (a hairdryer helps with this as does compressed air).
Or you can try a commercial product like Super Contact Cleaner