Big question and I'm going to leave the 'when to use the subjunctive' question to Sue
I'll just comment on the examples.
A) He looks as if he hasn't slept all night.
This one is the one that sounds correct to me, probably not what I'd say, but it's OK. I wouldn't add the 'all night' part. It's a bit redundant. If anything I'd probably add 'at all' - He looks as if he hasn't slept (at all.)
B) He looks as if he hadn't slept all night.
This one is a bit tricky with 'sleep', because it sounds like he has
slept since then. When you use the past, hadn't slept, the action has been completed, but there was something at the time or that action affected something at that time. In this case, that means he has slept since then (not sleeping has ended.) So, here it would be hard to 'look as if' you hadn't slept all night. Instead, 'He looked
as if he hadn't slept all night.' - at the time I saw him.
There might be examples where it would work, but I can't think of any. Everything I come up with sounds forced and awkward.
C) He looks as if he didn't sleep all night.
This is awkward to me. I'd say, 'He looks like he didn't sleep last night.'
I hope that helps. Again, Sue is much better at making these points clearer.