You can use powders such as Oxyclean or Biz Powder to remove coffee stains, even if they have already set in. Dilute the powder with water and leave the garment soaking in the solution until the stains have been removed, letting it stay as long as it takes.
Use either Biz Powder or powdered Oxyclean combined with a bucket of hot water to remove set-in stains. After filling a bucket appropriate for the size of the stained garment, add a plentiful scoop of the powder of choice. Allow the garment to soak for however long is necessary to remove the stains. If the solution begins to turn to a brownish, non-clear color, cycle out the solution, adding more cleaning powder as necessary. This is an indication that the process is working, and certain stains can require several rotations of water-powder solution until they fully disappear.
If stains are severe, or are not coming out with the application of the initial water-powder solution, then add Tide bleach in small amounts to a new mixture of powder and hot water. This increases the power of the cleaning powder, and thus increases the chance of successfully removing the stain from any given garment.