According to the Centers for Disease Control and Prevention (CDC), they can spread many dangerous diseases, both directly and indirectly. For example, they can directly spread the plague, rat-bite fever, hemorrhagic fever with renal syndrome, and many more. Indirectly they can spread diseases because people can get infected by ticks, fleas, and other parasites that have fed on a diseased rodent's blood. Those diseases include the West Nile virus, Lyme disease, La Crosse encephalitis, and more.
The bottom line is that there's no easy way to tell which rodents carry diseases ahead of time. So the solution is to get rid of rats and mice, having them removed from your home or business by professionals.