The sentence that is punctuated correctly is sentence d.
Not only does it sound right when you physically say it, but it is grammatically correct. Looking at the other sentences, you can see how in a, there are no commas after rain. In b, there are too many commas. In c, there shouldn't have been a comma before and. Therefore, the only logical response would be d.