Either when my prescription changes or when I feel like the frames have gotten too outdated for me. My prescription hasn't changed in a few years so I had the same pair for a while. Recently I got new ones though because I'm too old for the previous I had gotten when I was like 11. They were some little kiddish plastic frames that got way too small for my face. So it was definitely time for an upgrade.
you're supposed to get your eyes checked every year up until you're like.. 10 or 11 or something. after that its every 2 years i think. i get new frames every 3 years or so. i'm due for new glasses and a check up right now.