It was Wyoming and the year was 1889 which I think is VERY SIGNIFANT. The reason is that the census of 1890 showed that the Frontier was officially closed. Shane represented an end of an era. Ironically, his heart was really with the cattlemen. If you note at the beginning of the story that Shane could have rode towards the farm or towards the cattle ranch. He chose the farm, much to his later bemusement.
True, the cattle baron was portrayed as the bad guy but you can tell that the author had a note of sympathy for the cattlemen's life. Even Joe worked as a cowboy but, as "civilization" intruded, chose farming. So this book is also interesting on the level of the farmers vs the cattle ranchers which was actually was a big point of contention back in Wyoming of that time. I think there were some elements of an ethnic conflict (not mentioned in Shane) as well. Most of the farmer settlers were German or Scandinavian while the cattlemen were mostly Scotch-Irish or English background. The latter looked down on farming but the former thought of the cattlemen as wasteful of resources. I sort of know about this because I once wrote a paper on immigration trends in the Old West. Also I worked on a ranch (actually a farm) in Montana once and I noticed that this divide still exists on a lesser scale to this day.
p.s. One little known fact of the Old West. Many of the cattle barons were actually British aristocrats looking for an exciting investment. This was especially true in Wyoming and Montana.