The best I can figure, unless it says otherwise, monster SR is generally based on CR; but this gets dicey, at best. So, if you're advancing a Bearded Devil 4 racial HD, that should be a +2 to the SR, to correspond with the +2 CR from advancing those 4 HD. Once you start tacking on templates, that's a different story.
Creatures that have SR based on HD will say so in the entry (the first example I can think of off the top of my head is a pixie).
How does that answer your question?