Wiring electrical switches is a useful basic skill for the home do-it-yourselfer. And ceiling lights are one of the most common applications for electrical switches. Whether you're rewiring, remodelling, upgrading, or fixing a faulty switch, wiring a ceiling light switch is a useful skill to have in your home repair repertoire.
Turn off the power to your circuit. Flip the appropriate breaker to the "off" position at your circuit breaker box. If you're uncertain which breaker to turn off, throw the main circuit breaker for the house to "off."
Identify your wires. At the gang box where you'll install the switch, there should be two cables. One leads to the ceiling light and the other leadsback to the circuit breaker or other outlet. Each of these cables will have two wires: a black one and a white one.
Connect the white wires together. Strip back 3/4-inch of insulation and connect the two wires with a wire nut.
Connect the black wires to the switch. Strip back 3/4-inch of insulation from each black wire and connect them to the screw terminal on the side of the light switch.
Mount the switch into the gang box, using the screw mounting tabs. Cover it with a switch plate. Turn your circuit back on and test the light.