If stored properly paintballs can last in good condition for a year or more. Once opened or not stored properly however paintballs may last as little as a couple weeks.
To make your paintballs last as long as possible do not open the bags unless you are going to use them that day. They should be stored in a cool, dry, climate controlled room between 50-70 degrees Fahrenheit (10-21 degrees Celsius) and always handled with care. If all of these conditions are not met, paintballs can become too brittle, form dimples, harden, break or swell. This will make your marker inconsistent, inaccurate, and could affect the velocity of the paintball.
For more info visit this blog.