When gear change get's sloppy or stiff. If you feel it's not changing well, just change the cables (and outers) - then you'll really notice the change.
As for when/how often, this depends upon your riding, what weather conditions it's ridden in, and of course how you maintain/clean the bike.