It is prescribed when the dog's immune system is attacking itself, causing inflammation. Since diarrhea can be caused by intestinal inflamation (see causes of diarrhea) a corticosteroid such as prednisone (otherwise know as steriods) is prescribed in addition to other approaches such as alterning your dog's diet.