In relevance to writing, a time frame refers to the amount of time your book/novella/short story takes place in; a time frame can be anywhere from a day to a lifetime, or several. Sometimes choosing a time frame for your story is easy (eg. a teen summer romance, will, obviously, take place over two to three months); in other situations, it's difficult to chose how to pace your novel.
The most important thing when choosing your pacing is to BE LOGICAL.
Whether you're writing romance, suspense, or fantasy, is to be logical and watch your pacing. You have to make sure that the events of your book, whatever they might be, are taking place in a realistic amount of time. If the events in the novel are supposed to occur over a month or two, make sure that they actually could take place within that time.
If you have your characters traveling across the world, that not going to happen in a week/month, unless your world is about the size of a state or they have magic portals/teleportation. Do a little bit of research, and try to find examples in real life, of how long the events in your story would actually take to occur, and base a time frame off of that.
However, you should always choose what feels NECESSARY.
If it's a simple, as in it doesn't have many events, story, you don't need to drag it out and have it take place over years. If it's a more complicated story, with many different characters, events, and world-building that need to be established, it's quite fine to have the story take place over years.
The converse if also applicable; a simple story can take place over years, while a complicated one can take place over a week.
Two things that a time frame affects is BELIEVABILITY and MOOD.
We've pretty much covered believability, and in previous posts as well, but I cannot stress enough how it's importance. I can't count the number of times I've scoffed and nearly put a book aside because of the romance happened within days of two characters meeting each other, wars started and were over in a week, and characters recovering from almost fatal wounds in a matter of days without any assistance. Suffice to say, if your time frame isn't realistic, readers will have a much harder time finding the book realistic and/or good.
Mood is slightly misleading, so let me clarify; the time frame that you chose to write your novel taking place in can change how it affects the reader. For example, if the novel is full of action, but only takes place over a few days, it will seems a lot more suspenseful than if the same events spanned months. A adventure novel that takes place over several years can really make it seem like the reader actually went on journey, rather than reading two characters get from point A to point B.
To summarize, when choosing a time frame for your story be logical, do what seems necessary, as it can affect it's believeability and mood.