The primary reason is to re-establish the identity of the corpse. This is done by DNA analysis and other forensic means. Sometimes, criminal investigations done in haste have to be re-proved or at least reconsidered. Besides actual identification, other possible criminal activities require further investigation. For example, if poisoning becomes a possible cause of death, the exhumed body may reveal clues overlooked at first – traces of strychnine, for example, are preserved in the hair and bones. Another, much less frequent reason for exhumation is the reburial to another site – family plots, for example, or military graveyards, or re-identification of one’s home territory or final wishes. Finally, sometimes entire funeral sites must be exhumed. The greatest example might be the Tennessee Valley Project, which required relocation of whole graveyards so that artificial reservoirs could be created in their locations.
With today's modern technology things that were not known years ago are know possible to know through the use of dna analysis, and forensic science. For example with the exhume of Egyptian corpses scientist were able to determine how long a king live and what type of illness effect their lives that could further add to stories that are discussed about them. Also corpse can hold the key to evidence that could have been over looked during an investigation.
To add on to what the previous person said before me, another reason for exhumation is due to culture. Up until the late 1930s, many Chinese people who died and were buried in the Pacific Northwest and West were later exhumed and their bodies were sent back to China. In Vietnam it is part of their beliefs that after a body has been buried for three years they dig up the body during a very personal ritual, where they hand wash the bones in a liquid that dyes them black, places them into a box lined with gold paper in anatomical order and gives them to the family. There is a much bigger part of this ritual. You can watch one occur in this video https://www.youtube.com/watch?v=VZ-F0I5XvIU starting around minute 36, however it does show actual human bones, so it can be graphic to some.
Another reason to exhume a body is to learn more about the history of the person. When they find mummies in Egypt, they exhume the bodies to be studied to learn more about the person, their lifestyle, culture, etc.