I think for the most part they are pretty similar, but "by the time" usually seems that an action has taken or will take a certain amount of time to be completed. And simultaneously another action will also have been completed or is beginning.
Example
By the time you finish your dinner dessert will be ready.
By the time I arrived at the house, he had already left.
When seems to be more conditional. When is usually followed by a request or some kind of information.
Example
When you finish your dinner, you may have dessert
When I arrived at the house, they greeted me.
But sometimes they are both interchangeable.