Schlecht is a word that means bad, not good, poor in a fairly neutral way - it's simply the opposite of good. Schlimm can also mean all those things, but carries connotations of something being threateningly wrong or having serious consequences.
The English word "bad" can have both connotations, the neutral "not good" or the "uh oh, this is bad" one, so it may be more helpful to see whether you can translate it with "not good" - things can only be schlecht if they can also be gut, so if good/not good that doesn't work, schlecht is probably the wrong word.
Let me give some examples that will hopefully help pin down the different connotations.
Examples where both words could be used:
Er hat schlechte Noten.
"He has bad grades." / "His grades aren't good."
Er hat schlimme Noten.
"His grades are so bad I'm worried about it."
Das ist schlecht.
"This is bad." / "This isn't good."
Das ist schlimm.
"This is seriously bad."
Examples where only one word makes sense:
Das ist eine schlimme Wunde.
"This is a seriously bad wound."
This is one of those cases where you can tell schlecht doesn't work because not good doesn't work as a translation. "This wound isn't good?" Duh. A wound can't be good, so you don't need to tell us it's not. It can just be really extra bad.
Das ist ein schlechtes Lied.
"This is a bad song." / "This song is not good."
Schlimm doesn't really work here if you're just talking song quality, because the fact that the singer is screechy and the lyrics are insipid will hardly have dire consequences. Of course you could call a song schlimm if it was misogynistic and racist, or a piece of propaganda for a dictator.
It's a really hard difference to explain, and I suspect I didn't cover all edge cases, but I hope that helped narrow it down some.