For light switches and wall power sockets, it pays to remove the face plates before painting. Generally you can simply lever the face plate off with a thin flat blade screwdriver. If it is stuck, you may need to carefully run a razor blade around the edge to cut through any previous paint that is sticking it to the wall.
If the face plate has yellowed with age, then you can generally pick up new ones from your local hardware shop or electrical supplier for a few $. Remember to put some strips of blue masking tape over the socket to protect it from drips while you are painting.
For light fittings, remove any glass pendants or covers and simply carefully paint around the fixture.
Never attempt to remove the actual wiring or light fittings (no matter how tempting). The risk of rewiring it back the wrong way is very real and very dangerous. If you really must remove a fixture or fitting, call a sparkie to come in and make it safe for you while you work.
For more information about electrical safety while painting or if you would like to book a fully qualified, insured and trained electrician in the Brisbane area, please call TMOT on 0415 623 770