A junction box, also known as a splice or switch box, is an electrical enclosure inside your home that contains wiring. Electrical wires run behind the walls and through the ceiling of your home, meeting at junction boxes. It is a safety hazard to completely bury a junction box in a wall.
Building Code: It is against most building codes to bury a junction box in the wall. In addition to being dangerous, doing so is also impractical. If an electrician needed to access the junction box, she would need to cut a hole in the wall. Short-circuits and wiring issues are possible in junction boxes; if one of these issues took place in a box hidden from view, it could light and catch the interior of the home's wall on fire before you noticed.
Options: When an electrician installs a junction box, he has a couple options as to how to finish it. Most homeowners don't want the junction box to be overly apparent, which is why these boxes are common in basements and garages, which often have less of a finished feel. To conceal the junction box, the electrician or builder often adds drywall up to the sides of the box but leaves the front panel door open. This way, the box does not jut out from the wall.
Safety Considerations: Always use a certified electrician who knows how to install and work on a junction box safely. Boxes are available in a variety of sizes and should always be large enough so that they're not overcrowded. A junction box stuffed with wires increases the risk of two wires rubbing and causing a fire. If you are familiar with electrical work, check the junction box occasionally to inspect the wires for signs of burning.
Exterior Boxes: In settings such as mobile home parks, junction boxes are often installed in communal areas because the mobile homes can change. In these cases, the boxes are typically installed on pressure-treated wooden posts so that they are easily accessible. The exact height of the boxes depends on the municipality's building code.