The answer depends on age. Babies, no. Light can interfere with melatonin production and interfere with night time sleep. Babies are not scared of the dark, in fact they find it quite relaxing as they are used to pitch black inside the womb.
As for toddlers, the fear of the dark can emerge around 2-3 years old, and can result in tears at bedtime or waking in the night to find parents.
If you want to introduce a night light, use a light that omits red or orange light, as these limit the disruption of melatonin production.
Some children will prefer to have the door open ajar, which is absolutely fine too, but you need to have clear bed time rules to ensure your child stays in the bed with the temptation of an open door.