We use this expression to say that it is good something happened or someone did something, because it avoids a potential problem.
You can use this phrase in ………… language.
A: Careful – that one’s broken.
B: Just as well you told me. I hadn’t noticed. Cheers.
A: The weather forecast said it’s going to rain tomorrow.
B: Just as well you told me. I was going to play tennis.