My dog is a rescue, so I don't know how old he is (I know within a 2-year range, just not the specifics). I asked my vet how I'd know it was time to move him to senior food, and she said to look for signs that he was aging -- less active, less mentally alert, worse digestion. So I'm waiting until his current food doesn't seem to be working.
That said, my previous dog developed kidney disease as an old guy, and the kidney food was either unpalatable or too fatty (the calories have to come from somewhere), so I decided it was better to shorten his life a little than to have him spend his final months hungry or laid low by diarrhea.