Read Deuteronomy 9:9-11. These verses include the detail that Moses fasted 40 days while up on the mountain, receiving the commandments from God.
A comment - was this just because the mountaintop was a desolate place, with no food? Probably not. God fed a prophet later on by ravens; and God owns everything. There seems to have been an actual reason for Moses to fast. Nor does it appear that Moses was mourning for his sins, or those of the people (he did not know yet about their worship of the golden calf). There was some other reason.
Now read Acts 13:1-3. It says that these church teachers fasted; and again it does not appear that they were mourning for their sins, or those of the people.
In both cases people it seems were fasting as they were seeking to know God's will, to understand God's word better. Moses was not just on a quick trip up there to receive those stone tablets and rush down again. He needed to understand. He sought the Lord for this. So also the teachers in Acts 13. Moses and these teachers were ministers. It is part of the work of ministers to dedicate themselves to know the word of God, and they often have to practice self-denial as they are seeking this knowledge.
So also with every Christian. We all own Bibles, yet we would probably admit that we have not sought to understand God's will as much as we ought. If we really want to understand more, consider the need for self-denial. (It might be fasting at times, but often it is other things as well.) We Americans are generally not good at self-denial. We let ourselves be preoccupied with the world so much, it's no wonder that often we have trouble discerning the will of God.
- Christian Self-Denial