It depends on the nature of the puzzle.
For some types of puzzles, you can think of it in terms of marginal cost and marginal benefit. In other words, what does the player gain by spending more time, vs what do they lose by spending that time.
Suppose a game like the cups and balls. This probably wouldn't normally be considered a "puzzle", but just consider the moving of the cups to be equivalent to any method of obscuring information (which could be done through more "puzzling" logical challenges).
The rules of the game are simply that the player must tell what cup the ball is under after a certain minimum amount of time (and therefore minimum amount of obscurity) has occurred. Now, they can choose to answer at that point, or they can choose to think about it and delay their answer to think it over more. The catch is that if they choose to delay, the cups will periodically be shuffled again and again.
Back to the model of marginal cost and marginal benefit. We can see that in some cases, the player will want to delay so that they can think over their logic to make sure they are confident in their answer. Therefore, we can say there is a marginal benefit to spending more time. For the more time you spend, the greater your confidence will be about which cup is the correct one, and therefore your chances of success increase.
At the same time, we can see that the player doesn't want to spend more time, because every time the cups shuffle, more obscurity is created and the player becomes less confident in what the correct answer is. Therefore, we can say there is a marginal cost to spending more time. For the more time you spend, the lesser your confidence will be about which cup is the correct one, and therefore your chances of success decrease.
Now the puzzle has two opposing forces, both of which will dictate how much time the player is willing to spend. So long as the marginal benefit is greater than the marginal cost, the best course of action (by definition) is to spend more time on the puzzle. In order to put pressure on the player, you want a mechanism whereby the marginal cost will gradually rise and overtake the marginal benefit.
In this case, since the marginal benefit is proportional to the player's problem solving ability, we can consider it to be somewhat constant. The marginal cost, meanwhile, is proportional to how fast the cups are shuffling, which can be precisely controlled (again, this is equivalent to any logical puzzle which obscures the solution, or adds more work). The solution to put pressure on the player then, is to have the shuffling frequency progressively increase.
Consider the chart above. The green line is the marginal benefit of spending time, or the player's solving ability. The red line is the marginal cost, or the rate of obscurity. As long as the green line is higher, the player is gaining progress or confidence in their answer. As long as the red line is ahead, they are losing progress or confidence. As the red gets closer to the green, it may be beneficial on average to keep working, but the potential detriment of individual mistakes also gets higher.
The green line is only dictated by the player's ability to solve the puzzle, but the red line is what you get to control in the design of the game (namely through the difficulty and frequency of puzzles). Use these mechanisms to control the red curve in a way that you think is fair and enjoyable.