As reviewer Monica Edinger writes in the New York Times, When You Reach Me is a "hybrid of genres, it is a complex mystery, a work of historical fiction, a school story and one of friendship, with a leitmotif of time travel running through it" (source).
Edinger is, we think, right on the money. The story would definitely qualify as a mystery novel (who is sending those eerie letters?), a work of science fiction (is time travel possible?), and a children's novel (a work geared to younger readers that explores coming-of-age themes). The historically specific setting (New York City in the 1970s) means we might also call this novel historical fiction.