According to All About Vision, your eyes can change over time, causing your current prescription to become inaccurate and no longer adequately correct your vision. Eyeglasses made with an out-of-date, inaccurate prescription can cause eye strain, headaches, and possibly a serious accident due to blurry vision. Even if your glasses prescription stays the same from exam to exam, you should have routine eye exams to make sure you're not developing potentially sight-threatening eye conditions like diabetic eye disease, glaucoma, or macular degeneration.
Lens prescriptions typically are valid for a minimum of one year, which is the minimum required by state law, up to two years from the day of your eye exam when the prescription was written and given to you. However, the expiration date on a glasses prescription might be shorter if you are at higher-than-normal risk of your eyes changing more quickly.
Contact lens prescriptions also have an expiration date. Typically, the expiration date is one year from the date of the exam when the prescription was written. Your eyes should be evaluated annually if you wear contact lenses to make sure your contacts aren't causing harm to the front surface of your eyes or putting you at risk of eye infections.
Do not try to purchase replacement eyeglasses or contact lenses online (or elsewhere) if your prescription has expired. It's illegal for anyone to sell you eyeglasses or contact lenses without a valid prescription.