Ding dong ditch is pretty normal for kids to do. Not saying they should, but kids (even good ones) will look for trouble just for the thrill of it from time to time. Hell, we used to do it in broad daylight. But I grew up in a nice, safe neighborhood, and I am assuming that the neighborhood in question is less so.
Even if the shooter thought it might have been an attempted home invasion, shooting at someone who is running away is always a bad shoot.
A few months ago I pulled a shotgun on someone who was clearly trying to break into my home. He ran, so I did not pull the trigger. He also hasn't come back.