Moving Electrical Wires and Junction Boxes
In both older homes, and new construction, it is common to have the access points to your wiring in a less than desired location. It is possible to move the access point where a lighting fixture is installed in your ceiling or wall with some simple rewiring.
Electrical wires and junction boxes need to have an access point to hang a lighting fixture. If you want to move this access point, in order to hang a fixture in a different location, you need to move the electrical wiring and junction box too. The junction box is where the wiring is housed, and is designed to protect your studs and insulation from any electrical current that would otherwise become a potential fire hazard. If you have had your electrical box moved, and the old box is still in your ceiling, it must remain accessible from below with a plate cover. Please note, recessed lighting is different; you must have an IC rated fixture to place insulation around the fixture.
There needs to be an access point to the wiring, so it is crucial not to cover the junction box with drywall. The correct way to move a ceiling light fixture or wall sconce is to pull out the existing junction box, and re-route the wires through the new access point. You can close the old access point in your wall or ceiling with insulation and drywall. If you are not comfortable with wiring, hire a professional electrician to run your new wire.