About two hours after death, the cornea becomes hazy or cloudy, turning more opaque over the next day or two. This obstructs the view of the lens and back of the eye. This clouding may provide a rough estimate in helping to determine time of death.
The eye can help determine how long a body has been dead through the measurement of potassium levels in the vitreous humor. The vitreous humor is the liquid inside the eye. Potassium is an element found in cells where it acts as an electrolyte. After death, blood cells in the body break down and release potassium. In the eye, this process happens more slowly and at a more predictable rate than in the blood. Its also a process thats unaffected by temperature. Thus, a pathologist can sample the potassium level in the vitreous humor and use that value to calculate an approximate time of death.
These methods are used along with other physical findings such as rigor mortis (stiffening of the body), livor mortis (gravitational settling of the blood), algor mortis (cooling of body temperature) and decomposition of the body. Even so, the best estimate of time of death has a margin of error of hours.