While Holmes does not fully explain how he solved the case in A Study in Scarlet, knowing more about his deduction style can help explain how he knew. As a "consulting detective," Holmes primarily uses the powers of deductive and inductive reasoning to solve crimes. Through deductive reasoning, Holmes uses minute details from a crime scene to create a logical, evidence-based hypothesis. He then uses inductive reasoning by using criminal, scientific, or medical knowledge he already has to flesh out his deduction and solve the crime.
In A Study in Scarlet, the crime scene itself is primarily where Holmes gathers evidence to form his deduction. The bloodstains left in the room without any weapons or signs of a struggle indicates that the blood is from the murderer, not the deceased man. This could indicate that he knew it was Jefferson Hope because a red, flushed face is a symptom of those who get frequent nosebleeds. Hope's flushed face indicated to Sherlock that Hope had suffered a nosebleed on a crime scene, which explains the lack of a struggle or weapon. Hope's arrest and subsequent confession (and death) both solve the crime and justify Holmes's adherence to deductive and inductive reasoning.