It depends on the continuity
According to the Batman wiki:
The murderer is consistently identified as Joe Chill, though the
mythos alternates between versions where Batman finds out and where
Batman never finds out. Chill has also alternated between being a mere
mugger who randomly selected the wealthy Waynes, and a hitman who
murdered them intentionally (the former is the most common
The reason given for Chill leaving Bruce alive has varied. Sometimes
it was because Chill couldn't kill a child, sometimes because Chill
heard a policeman's whistle, police siren, or a rapidly approaching
policeman. Often, it is because of the cold, frightening look the
young Wayne boy gave Chill after the crime; Chill hesitated and ran
Joe Chill couldn't hurt a child
According to the 2004 comic "Fear Itself," Joe Chill simply didn't "have the guts" to kill Bruce. In this story, Chill is portrayed as properly paranoid, worried that millionaire Bruce Wayne will recognize him and have him sent to prison, there to await his execution.
The police scared him off
In Arkham Asylum (2009), I can seem to make out the faint sound of sirens after Joe Chill kills Bruce's parents in the voiceover.
The wiki is probably referring to something else, though.
Bruce Wayne scared him off
As this early comic would have it, Batman had a stare so intense that the hardened killer turned and fled.
What happened in the Dark Knight movies?
As far as I can tell, there's no obvious reason. No police siren or whistle, as has apparently been the case in other continuities. Kevin's answer covers Chill's possible motivations fairly well, and to my knowledge there has been no definitive answer from Nolan or others involved.