The העמק דבר says by the death of Adam (Bereishis 5:5):
תשע מאות שנה ושלושים שנה- הנה פעם כתיב בתורה מספר השנים המרובים תחלה ופעם כתיב להיפך גבי אברהם אבינו, ואין דבר ריק בתורה. ולפי הנראה, בכל מקום שהיה אותו איש רב פעלים בחייו, כתיב מספר המרובה תחילה ואח״כ המועט, להורות כי במעט שנים האחרונות ג״כ פעל ועשה בחייו ורשומים היו, משא״כ מי שלא עשה בזקנותו מאומה כתיב להיפך, זהו בדרך כלל, אמנם יש פרטים יוצאים מן הכלל, ובאו לדרשה כמו בשני חיי שרה דכתיב מאה שנה ועשרים שנה ושבע שנים, והדרש בת עשרים כבת ז׳ לנוי וכו׳, והדרש אינו מדכתיב שלש פעמים שנה, שהרי כתיב הכי בחיי ישמעאל ג״כ, אלה מדהקדים הכתוב מספר המרובה תחלה והרי בזקנתה לא עשתה מאומה, אלה לדרשה, וכן בשארי מקומות.
תשע מאות שנה ושלשים שנה- behold sometimes the Torah writes the greater amount of years first, and sometimes the opposite , like by avraham; and there is nothing empty in the Torah. And so it seems that everywhere that that person had a very active life, the great years are written before the few, to show that even in his last few years, he was also active and did things, which are written down (in the Torah). This is not so by one who did not do a (recorded) action in his old age, there it is written the opposite. This is usually; however there are exceptions, and they come to teach us a d’rasha, like by the years of Sarah, where it says “100 years and 20 years and 7 years”- and we learn that when she was 20 she was as beautiful as when she was 7, etc. But we do not learn this from the fact that it says “year” three times, because it says that by the life of Yishma’el as well. Rather from the fact that the great amount of years is written first. But she didn’t do anything in her old age (that is recorded)! Rather to teach you (when she was 20 she was as beautiful...), and so too in all the other places (where the general rule doesn’t apply).
In short: usually, it will write the amount of years from greatest to fewest to teach us that this person was active in his later life, and the Torah tells us how. It will write the amount of years from fewest to greatest to teach us that this person wasn’t active in his later life, or at least the Torah doesn’t say so.
Specifically by Sarah the Torah lists the years from greatest to least even though she didn’t do anything in her old age (that the Torah mentions) because we learn from this that she was as beautiful at 20 as she was at 7, and as sin-free at a hundred as she was at 20. (All other exceptions have similar d’rashos, apparently).
(Note: I do not know how the העמק דבר defines לא עשה מאומה- he didn’t do anything, seeing as Yacov went down to mitzraim when he was 130 and died just 13 years later, and afaict he doesn’t comment on that passuk; but that’s a whole other question.)