Take another look at the sentence:
Hunched over the keyboard for hours, Charlie used two fingers to hunt and peck out the 2,000-word research paper when lightning caused his computer to crash, Charlie wept more tears than the thunderclouds spilled rain.
When lightning caused his computer to crash is a subordinate clause, so it cannot stand alone as a complete sentence. Charlie wept ... begins a main clause. It is both legal and necessary to connect these two items with a comma.