Tuck Everlasting is set during the 1880s. This puts the story post-American Civil War and just after Reconstruction ended. Other notable events of the 1880s are things like the completion of the Statue of Liberty, the death of Jesse James, and the publication of The Adventures of Huckleberry Finn. The temporal setting also places the book close enough to post-romanticism which means that the belief that nature is mysterious and powerful would still be well known. That reverence for the mysteries of nature is very important in Tuck Everlasting because it is the spring in the nearby woods that grants the Tucks immortality.
The location is not specified in reference to a real location. The reader is told that the town/village is named Treegap, and that there are woods nearby. It's possible that the author chose this time and general location so that the reader would more readily accept a sort of mysticism that is often associated with small out-of-the-way old towns.