Establishing the time of death or postmortem interval (interval between time of death and when the body is found) is not always easy.
Exact time of death cannot be determined unless the death is actually witnessed, however different types of information can be used to help determine postmortem interval. The longer the postmortem interval, the harder it is to be exact, although the more factors that are taken into account, the more reliable the estimate is likely to be.
Factors involving the body include rigor mortis (stiffening of muscles after death), livor mortis (also known as postmortem hypostasis or lividity, the discolouration of the body after death due to blood settling under gravity), algor mortis (body cooling) and decomposition. The stomach contents can also be examined as well as the scene of death including environmental conditions such as temperature.
Reference: Dix, J., Graham, M. (2000) Time of Death, Decomposition and Identification: An Atlas. Florida: CRC Press.