Without doubt, stegosaurs were adversely affected by new conditions in the Cretaceous. Available data suggests that, right after their Jurassic heyday, stegosaurs suffered a loss of diversity similar to what sauropods endured - 57-89%. After this first setback, they were further battered, by Barremian time c. 127 Ma. Plated dinosaurs apparently vanished everywhere, except in Asia, where their last occurrences are dated Aptian-Albian. By mid K at the latest, Stegosauria was entirely gone. What caused plated beasts to wane and die out?
In their 2009 paper, Diversity patterns amongst herbivorous dinosaurs and plants during the Cretaceous, Butler et al. note an apparent correlation between the waning of certain plants (cycads, cycadophytes and bennattitalles) and the demise of stegosaurs. Citing earlier works suggesting an ecological association of plated dinosaurs and cycads (and close relatives) they suggest the disappearance of stegosaurs, from the start of the early Cretaceous to its end, mirrored the decline of such vegetation.
With their narrow snouts, stegosaurs do appear to have been specialized feeders, essentially limited to a specific type of plant. Ergo, they may have been vulnerable to loss of such flora. The available evidence however, suggests other factors may have been equally important, if not more so.