Most trailer companies these days use "sealed" lights, either standard or LED's. This prevents water from getting in to the actual light. There are 2 parts to these lights, the bulb portion and the bracket portion. To change a light you remove the bulb portion, which just plugs in, but the bracket portion remains on the trailer.
In the past, standard trailer lights had a red or amber cover that was removable, with a small replaceable plug in bulb. Some trailers on the lower end still come with this type light. Evidence of moisture under the cover eventually would be seen as drops of water / condensation allowed for mold growth under the cover, inside this type light it is common to see black or green gunk. I suggest you remove the light cover and clean out the cover and clean off the base periodically.
If one day you turn on your trailer lights and one or a few fail to light the likely culprit is the ground wire, lack of ground wire contact to metal. Remove the colored bulb portion of the light. Look for the ground wire on the right side of the bracket that remains on the trailer, it is attached ( usually by a screw ) to a small metal flat plate. Carefully loosen the screw, inspect for any corrosion, clean it off if need be, carefully tighten the screw. In my experience, 99% of the time once the ground wire is again making good contact your light will work again.