What kind of sedative do they use when doing dental work on children, and how dangerous is it?

General anesthesia. In my practice I've always used general anesthesia in children and placed an endotracheal tube (breathing tube). However, there are those who practice anesthesia and sedation on children having dental procedures who only use intravenous sedatives. Either is safe as long as done by a trained anesthesia provider using appropriate monitoring and drugs.
Usually laughing gas. Niyrous oxide (laughing gas) is what is usually used. It is very safe. Monitoring of blood pressure and oxygen level is important to do.
Different kinds. Depending on the amount of work they need to do and the child's personality. Some dentists use nitrous oxide (laughing gas), other either give their own sedation or have an anesthesiologist do it. If the dental work is extensive they may opt for a general anesthetic. As long as appropriate monitors are used sedation is safe. Discuss with your dentist.
Depends on age. This will depend on the age of the child, the child's ability to cooperate and the type of procedure done. Most dentists will give a sedative like versed to make the child drowsy but able to cooperate. If the child is not able to cooperate, possibly the use of oxygen and nitrous oxide will be used. This depends on the skill set of your dentist and his staff.