If it's only sometimes, try and see if it's the front or rear that doesn't light, then remove the 2 screws from the lens of the non functioning signal. Gently wiggle the bulb in the socket and see if it lights. Then push in on the bulb and turn it counterclockwise to remove it. Look at the lead contact point on the tip and the color of the base as well as the matching parts in the socket. If everything is cruddy looking, take some steel wool, fine sandpaper or a nail board and buff some shine into everything. Reassemble and try it out. New bulbs are cheap at the local chain auto parts stores, and the young guys inside are usually eager to help replace them. This is for the easy fix, there's a lot of other things that could cause it but lets try these first.
Good luck