Fasting is something members of the Church do for a variety of reasons:
1) teaches us self-discipline
2) teaches us about sacrifice
3) heals us spiritually and even physically (I remember hearing that going without food and drink for a few hours helps the body kind of cleanse and get a jump start of sorts)
4) allows us a chance to sacrifice for a purpose
As I've often heard, fasting without a purpose is just going hungry. The purpose is often something selfless. With the fasting, we combine it with prayer. We also donate a fast offering. It is recommended we start with donating the cost of the meals that we skip. But then we are encouraged to be generous beyond that.
Fasting is actually a Gospel principle that seems rather simple, but when I think on it I realize I have so much more to learn about it. President Eyring spoke about fasting in this past General Conference. I learned so much from his talk. He says it all better than I ever could, so I'm just going t post the talk here: