Neon screwdrivers are fairly crude tools that combine the functions of a small terminal screwdriver with a mains voltage detector. However they have a number of safety problems, and the majority view on uk.d-i-y is that the voltage detection capability is best not used at all.
How they work
Mains power flows down the screw driving tip to the resistor and neon in the handle. When you touch the brass cap, the body's natural capacitance allows enough power to flow through the screwdriver and the user to cause the neon to light.
This small current is entirely harmless, there is no electric shock under normal circumstances.
Water or condensation on the resistor can result in the tool shocking the user, maybe causing a fall from a ladder. Hence never hold one of these screwdrivers in your mouth, eg when working with both hands.
Certain tool faults such as resistor a failure can create similar risks.
Not being connected to or near earth, insulated from ground, can reduce current flow further, making the neon even dimmer. The body being capacitively coupled to some other nearby live conductor, can prevent the light lighting at all, even when the screw driver tip is touching a live wire or contact.
A user capacitively connected to a live supply will light a neon screwdriver touched to a non-live wire. Its quite easy to be capacitively coupled in this way without noticing. Holding an inspection light, standing on a cable, even leaning on a wall in some cases, and so on. Also touching a "floating" conductor (i.e. an unconnected wire that is routed in close proximity to other live wires) may also yield a false positive test.
Minimising risk / safe use
If you must use one of these devices, then adopt a sound "proven dead" approach to testing. Before making a test, test the screwdriver on a known live conductor and ensure it lights up. Next test the unknown conductor, and ensure it does not light, Finally test again on a known live conductor.
There is some question as to whether these tools, are legal to use in the workplace, since they don't possess a number of the attributes deemed necessary in electrical test gear by the health and safety executive. See the document GS38 Electrical Test Equipment for Electricians (PDF) - in particular section 9.
A much better alternative is a non contact volt stick:
These can give a clear and unambiguous indication of a live circuit, without even needing to open any insulating cover or make physical contact with the circuit.
Other alternatives a multimeter or other specialist electrician's voltage meter. A meter will do far more than a neon screwdriver, and do so with more reliable results. Multimeters have their own safety issues, but they are much less and more under the control of the end user, so can be minimised with care.