If I had had more time, I would have solved the puzzle.
This structure is used for a past that is disconnected in some way from the present. The disconnection might be as ordinary as a night's sleep, or as momentous as, e.g., being attacked by home-invaders: "If I had had more time, I could have found my gun and held them off. But I didn't have more time, and so here we are, out in the street in our pyjamas!".
If I had more time, I would have solved the puzzle.
Here the lack-of-time period is in the immediate past, still psychologically connected to the present. "If I had more time, I would have finished painting the room, but I had to stop so that I could shower and catch my flight to Boston." The "time" in this case extends toward or even into the present as a sort of phantom in which something could have been done/completed but had to be abandoned for some more important activity.