If your passport has expired, you can still use it to travel inside the United States, although it is no longer valid in foreign countries. It always serves as a valid form of photo identification within the country.
If you plan to travel outside of the country, keeping your passport current is always a good idea. Because it sometimes takes several months to receive your new passport, it is advisable to apply for renewal no less than six months before the expiration date. This helps you avoid the stress of wondering if you are likely to receive your new passport in time for your trip overseas.