You asked

Is it okay to use a nightlight in my child's room?

A nightlight used in a toddler’s room can make bedtime easier.

If you decide to use a nightlight in your toddler’s room, you’ll want to make sure that it is one that produces a small amount of light. If it is too bright, it could hinder your child from falling asleep. Additionally, if the light is too bright, your toddler may think it is still playtime and will try to get up and play over and over.

A nightlight is also helpful for the parent. When you awake in the middle of the night to check on your child, it is very easy to be disoriented and trip or run into the wall. A nightlight will help you to avoid this.

Many toddlers also become afraid of the dark. This is the age where their imaginations begin to run wild and things can seem very scary. A nightlight is needed in this situation to calm their fears.

Lastly, there are some who say that a nightlight will damage a child’s vision. This is simply an old wife’s tale and is not true.

More questions

Nightmares generally occur in the middle of the night or in the early morning. 
When is the right time to move your toddler from the cot?
 Up until 2 years of age, a child needs about 14 hours of sleep a day, most of which should be at night.
The best way for your child to sleep well is to develop a daily routine
If you can’t get your toddler to sleep through the night then it may be necessary to adjust his or her nap times during the day
Different children nap for different lengths of time at different times of the day but the most important factor is daily routine and consistency
There are many reasons you’re toddler may not be sleeping but also many simple solutions for this frustrating problem
When and how to make the transition from crib to bed
Benefits of having the right lighting in your little one’s room at bedtime
A guideline to knowing how much sleep your child needs and ensuring he or she is well rested