My grammar book says they both mean ‘if that’s the case...’ but it doesn’t clarify the differences.
それなら implies that the speaker anticipated multiple possible answers, or didn't anticipate what was just said. It's fundamentally more reactive.
おなかすいたな (I'm hungry) それならご飯にしようか (if that's the case, let's have a lunch)
それでは can be interchangeably used here and when used like that, it sounds a bit more formal than それなら.
In addition, それでは is also used in the context where the speaker is actively suggesting/driving a topic.
それでは試験を始めます (we shall begin the exam)