This is a simple trick to help a child (or anyone) who is afraid of darkness at bedtime. Utilizing a very old pirate technique, you can prepare yourself for darkness and/or a sudden ninja attack under a starless sky.
When I was a kid, I was afraid of the dark. Anything could be happening in darkness. A mindless zombie could be stumbling toward me. A demon could be clawing up from the reaches of Heck and discover the passageway between the netherworld and my bedroom closet.
This technique is in keeping with my own geeky "lets learn something" (or "teach a child to fish rather than the location of the local fish market") parenting philosophy. Certainly, there are complex psychological issues at play here but a simple fear of darkness may be aided by this technique. Most important is the fact that you are acknowledging your child's fear and helping him or her understand and use his own body processes to help him adapt to the situation. It's impossible to promise you will always light up the dark but it is possible to help a child understand how his eyes adjust to it.