After killing Bob the Soc in the park, Pony and Johnny know they need to hide from the police, since turning themselves in doesn't seem to be an option. Johnny decided that
"We'll need money. And maybe a gun. And a plan."
Johnny knew that Dallas Winston would know what to do, so they headed to Buck Merril's place, where a party was underway. Johnny knew that Dallas's street savvy and his hatred of both Socs and the police would help him to come up with a plan. Dally had previously staked out the abandoned church on Jay Mountain and planned to use it himself as a hideout, if necessary. Now, it was the perfect place for Pony and Johnny to use. Dally provided them with money, a gun, some dry clothes, and the route by train to the church. There he would meet them later in the week.
In the book "The Outsiders" Johnny and Dallas have a special relationship. Johnny trusts Dallas as he has always looked out for him. To Dallas Johnny is the only good thing in his life. Dallas is also the one in the group who has spent time in the pen. He is the one who knows what it is like to run from the cops and the one who has had the most experience with the police. Johnny suggests going to him because he knows if they don't hide he will be arrested for stabbing Bob the Soc. Dallas comes through by providing the boys with a safe place to hide and food. He is also the one who covers for them with Pony Boy's brother and goes back to keep them fed and updated on the events in their absence.
Johnny has always admired Dally. He immediatally sees Dallas as someone who can help he and Pony in a situation they believe Dallas will understand more than anyone else in their group.