Well, duh, obviously tastes change. Most of the bestselling authors from forty or fifty years ago have already been forgotten, since they and their core audiences have grown elderly or died. But what about classic genre writers?
Consider the case of Robert Heinlein. For forty years, he was the science fiction writer, a hugely influential, dominant, and generally beloved figure who shaped or created entire subgenres of fantastic literature, from urban fantasy to military space opera. He was controversial, but almost universally admired, and tremendously popular, becoming the first SF writer to reach the New York Times Bestseller List with Stranger in a Strange Land in 1961. But since his death in 1988, his popularity and significance have dwindled. According to Jonathan Strahan, one of the major editors in the SF field, very few young writers in their twenties and thirties have read Heinlein or are familiar with his work, beyond maybe seeing Verhoeven's Starship Troopers movie. It's not likely that Heinlein is going to go out of print any time soon, but it's harder to find a lot of his stuff in bookstores, besides bestsellers like Stranger and Troopers. It's not like when I was a teenager in the '80s, and even mall stores would have, say, Glory Road or Door Into Summer on the shelves.
As a counterexample, look at H.P. Lovecraft. He was never popular or even respected in his time, and his work wasn't even collected in book form until several years after his death. Even when he did become popular in the '60s and '70s, he was still considered a pulpy hack writer by many critics and a lot of fans. But today, he's more popular and respected than ever. Cthulhu is a recognizable pop culture figure (even Autocorrect knows he's legit!), and you can buy nice annotated editions of Lovecraft's work from Penguin Classics and Library of America. Not bad for a guy who died in total poverty and obscurity almost eighty years ago.
Maybe you could argue that these are simply reflections of larger trends. One argument goes that after Vietnam and Watergate, folks stopped looking to the stars in hope and began to look upon Space Age technology with dread and anxiety. But as far as I can tell, people still read Heinlein's contemporaries like Asimov and Bradbury. And while Lovecraft is bigger than ever, horror literature's popularity cratered in the early '90s and has never recovered the sales it enjoyed during the '70s and '80s. So there's something more complex going on beyond demographics or changes in social attitudes.