Although the small village in Shirley Jackson's "The Lottery" could belong to many parts of rural America, it is most likely that the setting is probably in New England. The author had lived in both New York state and North Bennington, Vermont, and
Jackson has admitted that the village [North Bennington] served as a model for the setting of the story. (eNotes, Shirley Jackson Biography)
No year is given for the time of the story other than it is early June: School has just let out, and the townspeople are turning their attentions to their crops and farms. There are few clues to the true time period: It could be the 19th or early 20th century, but certainly no later than 1948, when the story was first published.