Scout's attempt at a conversation dissipated a potentially violent altercation between the strange men who were talking to Atticus at the jail where Tom Robinson was held. Apparently Atticus suspected of a mob would show up to harras, lynch, burn, or attack the jail where Tom was being held.
Hence, Atticus goes to the jail to make sure nothing happens. His hunch is right; these men show up and had start making trouble. The interruption of Jem, Dill, and Scout may have been the very welcome interruption that Atticus needed to calm down the fiery characters, and to dissipate the action that was about to take place. The look of surprise on Atticus' face confirms this; Scout and Jem save the day.
This ended up stopping what could have been a horrific disaster. People were there in order for Tom Robinson to get hurt but when Scout sees all the men and confronts them, the reason why this is so important is because when she singles out Walter, he is able to think about what he is doing and how that is wrong, and because of that does not go through with the mob mentality esp since Scout is there.
Scout's childish attempt at the conversation with Mr. Cunningham stopped a what could have been a violent meeting between the men that met infront of the jailwhere Tom Robinson was held, because in talking to Mr. Cunningham (Walter's dad) and telling him to tell Walter that she said,"Hey." In turn Mr. Cunningham feels guilty, and he suggests that the men should leave.