This question reveals one of the story's most humorous elements because the answer is that nothing, in particular, prompts Simon Wheeler to tell the story of Jim Smiley. In fact, as we see in the opening paragraphs of the story, the narrator is actually trying to find out some information about a man called Leonidas W. Smiley. The narrator has never mentioned the name Jim Smiley or inquired about a man with a famous, jumping frog. He simply asked to be told everything that Simon knew about Leonidas W. Smiley.
It is, perhaps, the similarity between the surnames of these two men that prompts Simon Wheeler to tell the story. Alternatively, it could be a simple case of misunderstanding or of Simon not accurately hearing the narrator. Maybe, too, Simon was just desperate to tell an outsider all about the jumping frog.
Whatever the truth of the matter, the narrator never finds out the reason that Simon relates the story of Jim Smiley. It is a matter which Twain leaves entirely to speculation.