Depends on whether you're redoing the jambs and trim. Many insta-window replacement companies reuse jambs so they don't need to get into casing, extension jambs, and exterior trim at all. It allows for a quick, relatively inexpensive job, but smaller windows, as around an inch of space is lost on all sides.
So, you decide. If you're willing to rework the siding trim, you'd measure to the framing. If you're keeping the original jambs, measure those. It's also possible that you'd decide on some combination of those based on your trim details.
Sometimes you have to take things apart to come to a conclusion.