"She heard thunder" is a correct sentence. Both sentences are correct grammar, either with "the" or without "the". What matters is the sentences before them.
In English, we add the to a noun, if that noun was mentioned in previous sentences. It may also be "mentioned" without words, by the situation that is happening when this sentence is spoken.
For "She heard the thunder" to be correct, a previous sentence should mention the thunder, or at least the storm. Then "the thunder" means a specific thunder (the thunder of the storm we were talking about), while "thunder" means any thunder, anywhere.
If we weren't already speaking about a storm, we would say "She heard thunder".
Similarly, the "woken" sentence can use "the thunder", referring to the thunder of a storm mentioned before. For example:
"It was a bad storm, but we were exhausted. We slept thru the noisy wind and the rain banging on the windows. But we were woken by the thunder. All of us except Mikey. Thunder doesn't wake Mikey. Nothing wakes Mikey."