It all depends on the circumstances. What you describe is a "time
limit" puzzle, in which a puzzle is made more difficult by the
requirement that the player solve it within a certain number of turns or
else die (or render the game unsolvable).
The amount of time that is "fair" obviously depends upon how difficult
the puzzle is, but just as importantly, it depends on how easy it is for
the player to become distracted. If the player is trapped in a single
location (say, a prison cell which is slowly filling up with water),
then a fairly brief time limit is fair (as it's obvious what to do: save
the game, and try to get out of the cell). But if there are lots of
open-ended things to attempt - for example, if the player must deliver a
letter to someone before nightfall, and there are lots of puzzles that
are presented along the way that the author intends the player to leave
alone for now and to come back to after the letter's been delivered -
then you had better leave a very long time limit.
With time limit puzzles it's a good idea to have explicit reminders of
how limited the time is. In the case of the prison cell the rising
waters are such a reminder, but in the case of the letter you'll have to
be more clever ("Wishbringer" has the player's boss appear at intervals
and demand that the letter be delivered lest the player be sacked).
-- Gareth Rees