When you sprain your ankle, you normally tear some tissue in the ankle. This needs to heal. The body uses nutrition from food to heal this, particularly protein.
If you fast, the body wont have the nutrition available for healing, and you can expect healing to take much longer.