Like all of Doyle's Sherlock Holmes mysteries, we only know part of what the famous detective is thinking until he reveals his thought process at the end of the tale. In "The Hound of the Baskervilles," Sir Charles is apparently killed by his heart's fatal reaction to a gigantic, glow-in-the-dark hell-hound which is part of a family curse in effect for generations. Because Devonshire is a relatively remote setting and there is only one surviving Baskerville heir, the choices as to who murdered Sir Charles Baskerville are fairly limited.
Dr. Mortenson could be a suspect, but he gained only a thousand pounds in the will and is the one who is most interested in keeping the new heir, Sir Henry, away from his ancestral home.
The Barrymores could be suspects, particularly because of their rather odd and secretive behavior (which is eventually explained).
There is a prisoner loose on the moors who might have been involved, though we discover his connection to the manor as the story progresses.
Perhaps it was a random gypsy who wanted Sir Charles dead for some reason, though there is only a mention of this possibility.
The town benefited and prospered because of Sir Charles's munificence, so it was probably not any of them.
Really, that only leaves Stapleton. It sounds so simple, at the end of the story, to say it could only have been him; however, it is the truth.