They're pretty important.
Old strings could be over-strectched or just worn, dull, rusted, dirt-ridden, etc...and will sound lifeless and probably won't stay in tune.
New strings can re-energize a guitar and make it sound like it's supposed to sound.
I personally would never go years without changing strings. 6 months MAYBE on a guitar that I don't play much, but usually every 2 months or less I change them regardless.