Let's think about the individual parts to the sentence.
When the last bell for school rang
The students ran out of the door
and into streets to meet the summer
Because the first line starts with "when", the first line doesn't form a complete sentence on its own. The last two lines taken together make a complete sentence.
A comma is not necessary at the end of the second line before the word "and".
However, because the first part is a introductory phrase of sorts, it would seem appropriate to put a comma at the end of it.
Hence, the most correct option would seem to be D. "When the last bell for school rang, the students ran out of the door and into streets to meet the summer".
I hope this helps.