As long as you don't leave the guitar under the sun, or near radiators in the winter, or in front of air conditioners in the summer, the guitar will be just fine.
Even delicate instruments such as violins have survived intact for centuries, going through countless Russian winters and Italian Summers, in places that had less ability to control temperature and humidity than we do nowadays.
Regarding temperature specifically, experience shows that it is the rapid back and forth change between different temperatures that may cause problems. In other words, if a guitar stays indefinitely at either 10 Celsius or 30 Celsius, it will be fine for decades, if not centuries. But if the same instrument is subjected to several changes back and forth between the same 10 and 30 degrees, e.g. several times a day, then I think that after a few months or a few years, depending on the woods, the glues, the construction, you may start to see some warping or other forms of damage.
But if you pay just a little attention and avoid those extremes, the guitar will be fine.
For example, I've kept cheap acoustic and classical guitars in unheated weekend houses with sub-zero winters and 30s summers for years and years, without seeing major damage. After all, humanity has been building these instruments for centuries, and we have learned how to make them resistant enough to typical conditions.
Regarding humidity, on the other hand, prolonged exposure to either extremes cannot be good. Wood's own internal humidity will change according to the environment. High humidity in particular may damage an instrument fairly quickly. For that reason you'll usually find desiccant pellets in the packaging of new instruments -- even though they are packaged in plastic, new instruments may spend a few days or weeks in containers aboard a ship or in ports, in potentially high humidity conditions.
So, if you have to leave a valuable instrument for a long time in a place with a high humidity level, then you may want to use a hard case with a desiccant packet in it. But if the environment is an average one, there's nothing to worry from this point of view, I've had guitars, mandolins, sitars, and other delicate instruments all around me for decades without any problems from this point of view.