I've heard this claim many times, including this CNN report from 1999 which claims that "Night-light may lead to nearsightedness".
From the article:
...research in chicks [demonstrated] that the relative proportions of light and dark during the 24-hour day greatly affected eye growth and refractive development.
Even low levels of light can penetrate the eyelids during sleep, keeping the eyes working when they should be at rest. Taking precautions during infancy, when eyes are developing at a rapid pace, may ward off vision trouble later in life.
Although they admit that it may be a correlation, not a causation, the study's senior author still makes the following recommendation:
"Still, it would seem advisable for infants and young children to sleep at night without artificial lighting in the bedroom until further research can evaluate all the implications of our results."
Have there been more recent, more definitive studies to support or debunk this commonly-held belief?