The short answer is no, light does not keep centipedes away. Centipedes are attracted to light and will often enter homes through doors and windows that are left open. Once inside, they will hide during the day and come out at night to hunt for food.
If you are having a problem with centipedes in your home, the best thing to do is to seal any cracks or openings that they could be using to get inside. You can also try using traps or baits to catch and kill them.