This technique has been used to create beautiful pieces of art and even commercials. You can choose to write words/messages, you can paint pictures, you can even enhance pictures and give your subjects super powers. It takes the same amount of time as any other pictures, so have fun spicing up your photographic life!
Note: I use a Nikon D3000, so how I program my camera varies from how, say Cannon users, program their cameras; however, the basic principle is the same.
Find a dark location with no artificial light, and try to avoid street or areas where cars may pass by. It is really annoying to have a great shot be ruined by a car's headlights.
Put your camera on your tripod and make sure that the composition of your picture is what you want - this can involve taking some pictures with the flash on, but make sure to turn it off once you start the actual shoot.
Once you are done with that start setting up your camera.
Change the mode dial to 'M' - this is the Manual Exposure setting and it allows you control over the shutter speed and the f-stop setting.
To get the required shutter speed - which is slow as we need a long exposure length - I use the bulb setting.
To get the right shutter speed you will have to depress the shutter release (the button that takes the shot) down and hold it for as long as you want the shutter to stay open and as long as it takes to finish your writing.
Now...take the shot. If it doesn't come out perfectly, change something.
If the light is to thick, or not clear enough, or it allows for too much light, change to a different flash light.
Note that if you stay in one place too long the light will 'burn', causing too much white in the photo (as seen here).
You will probably have to use a second battery at one point, as the bulb setting eats at it.
But in the end, you will have some pretty cool shots.