There are some circumstances under which the loss or destruction of evidence may result in a criminal case being dismissed by the court or abandoned by the prosecution. However, the fact that certain evidence no longer exists does not automatically mean that an accused person wins their case.
It's important to make a distinction between evidence that is accidentally lost and evidence that is intentionally or negligently destroyed.
If evidence is accidentally lost, courts may be more sympathetic to the prosecution given that there was no evil or reckless intent. The judge will look at whether or not the lost evidence means that the accused person cannot obtain a fair trial. If, as a result of the lost evidence it is not possible for the accused to present their defense than the court may choose to dismiss the case. However, oftentimes when evidence is lost it may not be of such a significant nature as to deny an accused person the ability to have a fair trial. Sometimes lost evidence may be more detrimental to the prosecution. In some instances, the prosecution may not be able to go forward due to lost evidence. If that happens, the state may have no alternative but to ask for or allow the charges to be dismissed.
When evidence is destroyed, the court will tend to look more closely at the circumstances involving the destruction of evidence as well as the nature of the evidence destroyed. Some evidence such the alcohol content of a person's blood, blood stains, and organic materials may naturally disappear or become destroyed or diminished the passage of time. The court would look at what efforts were made to preserve the evidence and whether or not such evidence was intentionally allowed to be destroyed or not.
The court will also look at whether or not the missing evidence results in what's known as, harmless error to the accused person. For example, let's pretend that we have a murder case in which a gun belonging to the accused and thought to be the thought murder weapon was recovered. A bullet was recovered from the victim but the bullet was lost prior to forensic testing to determine whether or not it came from that gun. Suppose the defense argued that this evidence was critical to show that the victim was killed by a different gun and not the accused of a gun which is in police custody.
The judge's ruling would be based on what evidence is available. For example, if the accused person had confessed to the killing, there was a videotape of the killing clearly showing the gun in police custody in the accused's hand and five witnesses all saw the accused kill the victim, the judge might rule that while the evidence was lost the loss of the evidence was what is known as, harmless error. In other words, the accused person suffered no true loss as a result of the lost evidence. If the court came to the conclusion that the prosecution had intentionally lost or hidden this evidence then the judge might impose certain sanctions on the prosecution but, that does not mean that the sanctions imposed by the court would automatically be the dismissal of the case.
If all of the other evidence was as a result of the recovered bullet, and the defense was able to establish that such evidence was what is known as, the fruit of the poisonous tree, meaning that all the other evidence derived from this bad action, then, the judge might dismiss the entire case.
The short answer is there is no short answer. Every case is different facts and circumstances and the law will be interpreted and applied individually to each facts scenario.