We don't know exactly how long the village has been holding the lottery but we can make educated guesses. We are told that:
The original paraphernalia for the lottery had been lost long ago, and the black box now resting on the stool had been put into use even before Old Man Warner, the oldest man in town, was born.
If Old Man Warner is in his eighties, the black box now used for the lottery could be estimated to be at least ninety years old. However, it is probably not the first box made, as we learn the "original paraphernalia" had been lost long ago. From the mention of the newer black box, we can assume that part of the lost original paraphernalia was an older box. This would suggest that if lottery boxes last ninety years, the lottery is at least 180 years old. Since the story takes place in the late 1940s, that would date the traditional back to the mid-1700s.
However, given that it is a lottery meant to insure a good harvest, we can probably safely date it back to a more precarious time for early New England settlers, such as to the mid-1600s. That was a pre-Enlightenment era, when scientific knowledge was far inferior to what it is today, and people were more apt to lean into superstition.
These are all educated guesses. The main point is that the lottery has been going for the entire lives of the people assembled. It is an entrenched tradition that is difficult for the villagers to abandon, even if it is barbaric and unnecessary.