I find that using "By the time" stresses the length of time in the situation, whereas "When" is more for general usage.
I.e. "When I get home, she will be sleeping" - This is a simple fact.
"By the time I get home, she will be sleeping" - The use of "By the time" here stresses that it is going to take you an amount of time to get home.
(a) "When I got home, my family had already eaten" Vs. (b) "By the time I got home, my family had already eaten". My interpretation of (b) Would be that something happened to delay your trip home (maybe traffic? Who knows...) - but it definitely implies that something delayed your time.
It's a very minor difference, but a difference nonetheless.