Stephen Dole in Habitable Planets for Man, 1964, discussed how the length of day would affect a planet's habitability.
Chapter 4, the Astronomical Parameters, section Planetary Properties, pages 58 to 61 discusses rotation rate. On page 60 Dole writes:
Just what extremes of rotation rate are compatible with habitability is difficult to say. These extremes, however, might be estimated at, say, 96 hours (four Earth days) per revolution at the lower end of the scale and 2 to 3 hours per revolution at the upper end, or at angular velocities when the shape becomes unstable because of the high rotation rate.
https://www.rand.org/content/dam/rand/pubs/commercial_books/2007/RAND_CB179-1.pdf[1]
You might also want to check the 2007 edition to see if there are any changes to the estimate.
Note that Dole is discussing planets habitable for Homo sapiens, - and also for Earth lifeforms which have similar or identical environmental requirements, and also for alien lifeforms that have similar or identical environmental requirements. Most other discussion of the habitability of planets discuss whether the planets would be habitable for any lifeforms with requirements more or less similar to Earth lifeforms, including Earth lifeforms that live where humans would swiftly die.
For example, there could possibly be lifeforms in oceans beneath the icy surfaces of several moons in the other solar system. Thus discussions of the habitability of worlds often suggest that those types of icy moons could be habitable, even though humans would drown and be crushed by the water pressure in those subsurface oceans.
And you should note how tentative Dole is in his assignment of limits to the rotation speed.
The ultimate longest possible day for a planet is eternal day. The planet's rotation rate is slowed by tidal effects until the rotation period is the same as the orbital period or year of the planet. Dole believed that such a tidally locked planet would probably be uninhabitable because all the air and water would evaporate from the day side and freeze solid on the night side.
As Wikipedia says:
Astronomers for many years ruled out red dwarfs as potential abodes for life. Their small size (from 0.08 to 0.45 solar masses) means that their nuclear reactions proceed exceptionally slowly, and they emit very little light (from 3% of that produced by the Sun to as little as 0.01%). Any planet in orbit around a red dwarf would have to huddle very close to its parent star to attain Earth-like surface temperatures; from 0.3 AU (just inside the orbit of Mercury) for a star like Lacaille 8760, to as little as 0.032 AU for a star like Proxima Centauri[76] (such a world would have a year lasting just 6.3 days). At those distances, the star's gravity would cause tidal locking. One side of the planet would eternally face the star, while the other would always face away from it. The only ways in which potential life could avoid either an inferno or a deep freeze would be if the planet had an atmosphere thick enough to transfer the star's heat from the day side to the night side, or if there was a gas giant in the habitable zone, with a habitable moon, which would be locked to the planet instead of the star, allowing a more even distribution of radiation over the planet. It was long assumed that such a thick atmosphere would prevent sunlight from reaching the surface in the first place, preventing photosynthesis.
This pessimism has been tempered by research. Studies by Robert Haberle and Manoj Joshi of NASA's Ames Research Center in California have shown that a planet's atmosphere (assuming it included greenhouse gases CO2 and H2O) need only be 100 millibars (0.10 atm), for the star's heat to be effectively carried to the night side.[77] This is well within the levels required for photosynthesis, though water would still remain frozen on the dark side in some of their models. Martin Heath of Greenwich Community College, has shown that seawater, too, could be effectively circulated without freezing solid if the ocean basins were deep enough to allow free flow beneath the night side's ice cap. Further research—including a consideration of the amount of photosynthetically active radiation—suggested that tidally locked planets in red dwarf systems might at least be habitable for higher plants.[78]
https://en.wikipedia.org/wiki/Planetary_habitability#Other_factors_limiting_habitability[2]
So it is still rather speculative and controversial whether the extreme case of a tidally locked planet could be habitable.
If a tidally locked planet can not be habitable, then there should be some upper limit to the length of a day if a planet can be habitable, but the length of that limit is not immediately apparent. If a tidally locked planet can be habitable, presumably a planet can be habitable with a day that is much shorter than eternal and much longer than an Earth day.
You should also see my answer to the question:
https://worldbuilding.stackexchange.com/questions/174512/i-want-ten-earth-years-long-day-on-my-planet-can-i-have-it/174560#174560[3]
You should also go to the search function at the top of the worldbuilding page and search for other questions & answers. For example, I just now typed in "length of day" and got 782 results.