Assuming you are in the US, I would reference the National Electric Code (NEC). I think it's even available free online. This will go into detail about all the requirements for electrical systems to be safe and pass inspection.
If not DIY, could you be more specific with the topic you are interested in?