Electric light fixture junction boxes are enclosures mounted behind the wall or ceiling that perform a twofold function. First, they provide a mounting surface for your light fixture; second, they protect your house from potential sparks or shorts in the wiring connections to the light fixture. Proper installation of a light fixture junction box is essential for the safety of your home.
Decide on the location for a light fixture. Since the light fixture junction box is located directly behind the wall or ceiling where the light fixture is, you must know where you want to place the light fixture itself.
Chose the appropriate junction box for your construction. Boxes are made of a variety of materials -- plastic, metal and composites -- and are rated for different weights and usages. In addition, there are different mounting methods. Some nail directly to wall studs or ceiling joists, while others are held in place with support brackets or arms. There's no hard-and-fast rule about what material is best for a junction box, although boxes designed to support heavy lamps or chandeliers typically are metal and have support arms. Lighter-duty boxes, for smaller, lighter fixtures will usually be made of plastic and will nail directly to a stud or joist. When in doubt, consult with the salespeople at your local building supply store, or consult with an electrician.
Position your junction box at the location of your planned lighting fixture. If the junction box has adjustable support brackets, adjust their width so they press securely against the supporting studs or ceiling joists. Nail or screw the arms of the junction box into the studs. For junction boxes nailed directly to a single stud or ceiling joist, place the box against the surface and nail it in place. When positioning your junction box, take into account the thickness of the wall material so the front edge of the box will be even with the wall when all construction is complete. For example, if you are placing a box on a stud wall that will be covered with 5/8-inch wall board, the front edge of the box should extend out 5/8 of an inch from the stud. This ensures a flush surface when construction is completed.
Take out the appropriate "knockout tabs" -- removable plastic tabs that create spaces for running electrical wire into and out of the box. To remove the tabs, insert a screwdriver at the edges of a tab and pry it downward. The number of tabs you take out depends on your wiring needs. If, for example, you have one wire leading into a junction box connected to a single light fixture, you'll need to knock out one tab. If an additional wire runs from the light fixture to another light, switch or outlet, you'll need to remove an additional tab. A good rule of thumb is "one tab per wire."
Wire your light fixture as per its directions.
Check the weight rating of the junction box. Heavy lamps, chandeliers and ceiling fans require junction boxes designed specifically for those applications.
Always turn off the power to electrical circuits when working on them.