I am making the assumption that this Soldier is fasting for religious purposes. Based on my understanding of Army Regulation AR 600-20 paragraph 5-6, commanders will make reasonable accommodations for a Soldier’s religious beliefs. If the fast will interfere with the mission or potentially cause harm to the Soldier in the current operational environment then perhaps it would not be appropriate for the Soldier to fast. The Commander should make the call. If there is no impact on the Soldier or mission there is little reason to worry.
When working through this problem it is important to look at it from another perspective: Sometimes Soldiers go on diets or even stop eating at as result of trying to lose weight or they just may not like the food that is available to them. Some individuals fast frequently for health related reasons. Most individuals do not make it a point to inform members of the chain of command that they are fasting or dieting as such these Soldiers are not usually counseled.
It is important that Soldiers understand if their behavior endangers themselves, others, or the mission they can be held responsible for their actions under the UCMJ. It is not normally applied to situations like this but it can be if required.