To do light painting, you need to use a long exposure to capture the path of a moving light source. Set your camera to manual mode and try starting with a shutter speed of around 30 seconds. Keep ISO as low as possible and set your aperture according to the style of shot you want (if in doubt, start at about f/5.6). Then, take your shot.