Neurobiological research in genetically tractable organisms relies heavily on robust assays for behavioral phenotypes. The simple body plan of the nematode Caenorhabditis elegans makes it particularly amenable to the use of automated microscopy and image analysis to describe behavioral patterns quantitatively. This protocol provides an approach for obtaining uniform illumination during worm tracking. Good lighting can be more of an art than a science. Once the system is set up, it will be necessary to play with it, testing the results after each adjustment to ensure that the analysis software is able to clearly identify the worm and its boundaries. Although the protocol was developed for use in a single-worm tracker, it addresses factors important for the generation of reproducible, standardized images in all systems.