Rebecca Stead's When You Reach Me captures the grit and greatness of New York City in the late 1970s. Through the eyes of our latchkey kid protagonist Miranda, we're introduced to the city's sometimes dangerous streets, the buzz of the neighborhood shops, and all of the wild and wacky people who call the city home.
The setting makes sense, if you think about it. First of all, When You Reach Me is a novel about time and time travel. The setting of the novel calls attention to this theme by having its events set in a very specific time and place: New York City in the 1970s. In other words, because the setting isn't our own contemporary moment, time is something we notice from the get-go.
Second of all, Rebecca Stead grew up in New York City during this period (source). She has even said in interviews that her own childhood memories inspired many elements in the novel (source). Stead has always lived in the same New York City neighborhood. And just like Miranda, Stead even worked at a sandwich shop 40 minutes a day during her lunch period when she was a kid (source). Setting the novel in a period from her past would allow Stead to draw heavily on her own experiences – a technique many authors use.