Finding the time of death:
In cases of suspicious deaths, the first priority is to establish the time of death. The usual way of doing this is to take the internal temperature of the body. This is always measured because externally the body will feel cold to touch from an early stage. For the first hour after death, the body temperature will fall from its normal level (of about 98.6 degrees Fahrenheit) at a rate of roughly one and a half to two degrees per hour for the first twelve hours. This depends on the build of the victim, the amount of clothing or covering, and the temperature around them- if, for instance, the body is in the water the temperature will fall much quicker.

There are also other signs that can help with determining the time of death. Usually about two hours of the person dying, rigor mortis sets in. Which is a Latin term meaning "the stiffness of death". The internal chemistry of the body changes from its normal acid state to an alkaline one. This causes the muscles which were once relaxed at the time of death to tense and stiffen. Rigor mortis begins with the eyelids and then progresses to the muscles of the face, and then to the arms, torso and finally the legs. Within twelve hours rigor mortis has been fully established and the body is stiff and as unbending as a block of unbending wood. The body can remain in this condition for any time between twelve and forty-eight hours, until the body returns to a natural acid state. This reverse process affects the muscles in the same order in which rigor mortis stiffened them from the eyelids to the legs.

Sometimes the whole picture can be confused, by a muscular spasm that initially presents the same symptoms as rigor mortis, but is actually brought on immediately by a violent death. This is described in cadaveric spasm.

Another indication as to the time of death is called liver mortis, or 'the bruising of death'. This is when the heart stops beating, and blood stops circulating. The red blood cells descend by the force of gravity to the parts of the body that are closest to the ground. This turns a bruised colour from about two hours after death. If the body is not moved, this colouration fixes as the red blood cells break down and sperate into the surrounding tissue.
In the presence of poisons, the colours can be particularly vivid. Victims who have died from monoxide poisoning show a bright red colour in the lower parts of the body, while cyanide poisoning produces a pink effect.

Most recently, a quite different indicator was discovered by Dr. John Coe, a medical examiner of Hennepin County, Minneapolis. He discovered that as the red blood cells break down in the process that produces liver mortis, they release potassium. This diffuses into the liquid inside the eyeball (the vitreous humor). Taking a sample from the victim's eyeballs and determining the percentage of potassium in the liquid may provide the most accurate estimate of death yet discovered.

In most cases, the best estimate of time is taken based on fairly approximate indications given by these different signs.

Finding the date of death:
In cases where the body is not found for some time after death, the process of decay can give a pretty reasonable indication of the length of time the body has been undiscovered.
After two days, green staining normally occurs on the flanks of the abdomen. This is caused by the action of bacteria breaking down the blood. In a day or two more, the green will spread to stain the arms, legs and neck as the body swells. After a week, blisters appear.

In warmer conditions outdoors and at the right time of year, insects can provide another way of establishing how long the victim has been dead for. Flies, such as the bluebottle and greenbottle normally lay their eggs on fresh flesh, and the eggs hatch between eight and fourteen hours later, depending on the temperature. And then the maggots develop, shedding their skin in three progressive stages. They are fully grown some ten to twelve days after the eggs were laid and leave the body.

Forensic entomologists can provide accurate estimates of the date (rather than the precise time) of death by this method. This is explained in more depth in forensic entomology.

Information from 'Hidden Evidence' a book by David Owen.