The setting of "The Lottery" is important in the story based upon the contrast it sets in regards to what the day is to bring. The setting (time and place) of the story takes place on a sunny morning, late in June (the 27th to be exact). The blooming flowers and green grass sets up readers for a peaceful and tranquil day. The setting is compounded as the villagers' actions are described. The children are playing, the men are speaking of planting and rain, and the women gossip. Nothing seems out of place for the beautiful day they have gathered for.
That said, the end of "The Lottery" contrasts greatly to the beautiful day presented by the author (Shirley Jackson). In the end, the villagers stone Tessie Hutchinson, the "winner" of the lottery. The beauty of the day has been crushed by the reason for the gathering--death.
Another poignant fact regarding the setting is the idea that the village's identity fails to be identified. Many readers, specifically those in farm towns, can identify with the village. The men gathering and speaking about farming, the women gossiping, and the children playing in the dirt all speak to similar activities found in farming towns all over the world. Essentially, the openness of the setting allows readers to relate to the story in such a way that they can realize it (the lottery) could happen in any idyllic town.
Therefore, the setting of "The Lottery" affects the story given the great contradiction it sets up for readers.