The answer to this question lies in why we read, I think. We read to learn about other times, places, and peoples, and we read to learn about ourselves. In both instances, the time and cultural values of the setting are quite likely to affect what we take away from our reading and allow us to make more informed judgments about what we read. There are instances in which a story takes place at an unspecified time, with little to tell us about values, but in those instances, it can be helpful to know when the story was written or to have the understanding that we must bring our own time and values to the story to make meaning of it.
When we read to learn about other times, places, and peoples, we should be taking note of the time and cultural values in the text. First, we are going to learn something about the time and its culture, which is often a far more powerful means of learning than reading a history or geography textbook. It was far more interesting to learn about Afghanistan by reading The Kite Runner than it would have been to read about it in a history text. At the same time, we need to understand that the literary work reflects time and culture, so that we do not judge the plot and characters on the basis of our own different times and values. This gives us more empathy as we read, an insight into how people in other times and places might behave differently for good reason. This also provides us with the understanding that our way is not the only way, and this is a quite valuable understanding to have, enabling us to get along better with people, to not judge them so harshly according to one set of standards. Imagine how people in other times or places, with different cultures, might judge us! So, the cultural values and setting of a literary text provide us with understanding and insight into others, as well as informing us about the world past and present.
When we learn something about ourselves through reading, it is vital to consider the setting and cultural values, too. This prevents us from applying some lesson to ourselves that might be a foolish lesson to apply. As people behave in particular ways in a literary text, within the context of their own time and values, the underpinnings of their behavior makes sense in that world. But it might make no sense in our own world. In stories and novels, young children run away, people duel over their honor, and people have passionate affairs. Under the circumstances of the literary work, all of these might work, and the author controls whether the ending is happy or unhappy. But we need to take care as we apply such "lessons" in our own lives. These characters are acting in a way that is consistent within their fictional worlds. We need to understand the difference.
Finally, there are literary works that are deliberately placed in a kind of timeless and vague setting. "The Lottery" comes to mind, a story that could be anywhere at any time. In these kinds of stories, we are meant to bring along the values of the cultures we live in, in our own times. We are meant to judge the characters by our own values. But it is often helpful to know when a story was written, since that offers a clue to the culture and values the author was living in, and this can inform the story, too. It is my understanding, for example, that Shirley Jackson, who was writing shortly after World War II and had a Jewish husband, had the Holocaust very much on her mind as she wrote the story. I have also read that she lived in a small village that was not very tolerant of others. So, you see, even when a story is timeless, the times and values of the author can make a difference in how we perceive the story.
Whether it be the time and cultural values in the story that we can see or the time and cultural values of the author that we must tease out, it is vital to our knowledge and understanding to take note.