Brian Monetti, I <3 astronomy
Thunder would not happen in space, but lightning could. Lightning is an electric discharge, and discharges like this can happen when clouds of dust moving past each other pick up charge, and then when the charges become large enough, discharge. This likely happens in dense nebulas, and is known to happen on other planets. In fact, spacecraft have seen lightning on Jupiter and Saturn!
While lightning could happen, thunder would likely not. Thunder is sound, which requires a medium to travel through. On earth, this would be air. In space, the overall density is so low that the sound would not propagate. In fact, the movie Alien even had the tag line "In space, no one can hear you scream." Thunder would happen on planets with an atmosphere though! But not in open space.