Insulation is helpful even if it's not perfect. Ideally, you should cover the attic floor completely, without reducing airflow between any vents (soffit, ridge, gable, roof, whatever). Whether a specific area is important to insulate depends on your house, but as a rule, you should aim to insulate any walls/ceilings between living space and unconditioned space. You should also use some sort of vapor barrier at the edges, to prevent air and moisture from moving into your insulation.
Based on your question, I'm assuming you're looking at using rolled insulation such as fiberglass. You might also consider blown-in cellulose insulation, which is installed using a blower machine that can force loose insulation into cavities. If you buy cellulose insulation at a home center, they will often rent you the machine for free. Two reasonably handy people can do this installation -- you need one to feed the machine and one to operate the hose.
For insulating around wall/ceiling penetrations, you can also use a canned spray foam product (such as "Great Stuff" or "DapTex"). These will allow you to insulate tricky areas, and the foam will fill whatever voids you have -- perfect for pipes, around wiring, and around electrical boxes. Make sure you do not use these products in electrical boxes or around chimneys or other hot areas, as they are flammable.
I believe it's OK to place insulation on top of junction boxes. If you have recessed lighting in your ceiling, a special housing is required -- placing insulation over a regular recessed light housing can cause overheating and is a fire hazard.
One thing I'm not sure of is whether it's code-compliant to hide a junction box under insulation. Code disallows putting a junction in a hidden location, like inside a wall without an access plate. I don't think this would apply to insulation laid in an attic, but you may want to contact your town's inspection services department and ask.