Lighting on a ceiling fan operates similarly to any other type of light fixture. The only difference is that the wiring for the light routes through the ceiling fan and connects to the main wiring with the wiring from the fan. A pull switch is mounted on the base of the fan to control the function of the light. A nonfunctioning light indicates one of very few potential issues.
Before tearing apart a good ceiling fan, examine the basics. While uncommon, all the bulbs burning out at once can occur. Swap out one of the bulbs for a functioning bulb, and test it. Inspect the circuit breaker to see if that was tripped. Many people operate a ceiling fan from the pull switches without examining the wall switch. A seemingly unassigned wall switch may simply be a control switch for the ceiling fan. Looking at the basics will usually result in fixing a majority of problems.
The Pull Switch
Inspect the pull switch. A pull switch should be tight and click when pulled. Compare the pull switch for the lights to the pull switch for the fan blades. Pull the cover off of the fan, typically screwed into the base between multiple lights or mounted into the light fixture, to visually inspect the pull switch. A damaged switch will have chunks of plastic in the switch, signs of scorching or damaged wires. Switches screw into the side through a screw-on cap on the outside of the switch. The pull chain routes through the retaining cap. Unscrew the cap, and disconnect the electrical wires to replace the switch.
The wiring for the light is usually not the cause of a nonfunctioning light. If the fan works, the lights should work. Inspecting the wiring requires disconnecting the retaining screws that connect the fan to the mounting bracket in the ceiling and lowering the fan a few inches. You should see blue and black wires from the fan twisted onto the black wire from the main wiring. The colors of the fan wires may vary, so consult your installation manual to identify the proper colors. Pull the cover off of the light fixture to inspect the wiring near the switch and light sockets. Damaged wires will have melted sheathings or scorch marks.
Installation Versus Post-Installation
Installing the ceiling fan with a light requires wiring the light to the main wiring. If you just installed the ceiling fan and the light does not work, the wires were not connected properly. Consult the installation guide and correct the issue. When the light goes out post-installation and you have verified the function of the bulbs, the pull switch and the wiring, the only possible cause is the actual light socket. Rarely does the light socket malfunction, but it is the only aspect not previously addressed. Testing a light socket requires using a multimeter to verify that electrical signal is being received in the socket. Consult the owner's manual for the multimeter for proper testing procedures involving a light socket.