There are very few dangers of keeping pet rats, but only if those rats are domesticated and kept in cages. Rats that have ever been wild may carry a number of diseases that can be transmitted to humans. When the animals have never lived in the wild, the dangers of getting a disease from them are nearly eradicated. Even so, humans should not handle rodents that may have a disease if there is any risk of transmission.
While rats can carry many different diseases, ones kept as pet very rarely have any way of catching them. Diseases may be spread through bites and scratches and occasionally through contact on the skin. It is possible for a rat to carry a disease that is hazardous to humans without showing any symptoms, making it difficult to judge whether the animal is safe to handle. The best way for a pet owner to avoid getting sick is to keep his rats healthy and clean.
Rats that run around freely in a house are much more dangerous than those kept in cages. Diseases can be carried by rat urine and feces, which rats often drop wherever they walk. Also, because rats can get urine and feces on their feet, it is possible for a person to get sick from handling one and touching her face or food without washing her hands.
Other than diseases, the dangers of keeping pet rats are similar to those of keeping other pets. Rats can bite or scratch, and they can be aggressive if handled or raised improperly. Most are relatively small, meaning that the capacity of a rat to injure a human is likely less than that of a dog. Even so, bites can be painful and can get seriously infected, so it is not a good idea to touch or handle a rat unless it is familiar.
Most concerns over the dangers of keeping rats as pets are related to the history of wild rats spreading disease, not to domesticated rats. Not only are domesticated ones unlikely to spread diseases, but their diet and natural behaviors might even make them safer than animals like cats and dogs. Even so, a rat that looks sick or that has been out in the wild for any period of time should be inspected by a veterinarian. When they do spread diseases, those diseases have a tendency to be serious and are not always easy to diagnose because they are often rare.