Cast iron drain pipes typically indicate an older system that needs to be monitored regularly to help detect problems (typical life expectancy can be anywhere from 50-100+ years). If your property has older/aging cast iron pipes, budgeting for replacement would be prudent. Simply looking at the exterior of the pipes might not indicate that there are problems with the drainage system since cast iron typically deteriorates from the inside out although some types of soil apparently are corrosive to cast iron. Pipes installed underground horizontally are especially vulnerable. Both interior and exterior deterioration of the cast iron pipes can lead to pitting and pinhole leaks, followed by catastrophic leaks and failure. Tree roots are notorious for finding pinhole leaks in cast iron drain pipes and either crushing the drain pipes as they wrap around it, or entering the drain pipes through the pinholes, eventually clogging the drain and bursting the pipe.
If the cast iron drain pipes are under the foundation slab, failure can result in settling and cracking of the foundation. If the cracking and settling occurs towards the center of the slab foundation, the process of leveling and stabilizing the slab becomes more difficult and expensive. Some cast iron drain pipes are able to have the interior cleaned and sealed, thus prolonging the life of the system, and the process many times is less expensive than replacing the cast iron drain pipes. Consult a qualified plumber if drainage ever appears slow at sinks, toilets, bathtubs, showers, or laundry.
I am aware that some homeowners are advised to run some Liquid Plummer or Draino down all the sinks, bathtubs, showers, and toilets prior to a property inspection. Such a tactic usually works quite well in preventing me from finding drainage defects during the course of my inspection. In many cases, using commercial drain cleaners is a band-aid rather than a cure, so if there were problems which might have been detected during the course of a property inspection, those problems typically will reoccur shortly after the inspection. Again, consult with your Realtor about how you can protect your financial investment if functional drainage is not satisfactory after you close escrow, especially if there are cast iron drain pipes present.