I think it depends. Also it depends on what you mean by fasting. In the strict sense, fasting is only having water to drink. I think you should only do this for 24 hours. No more.
There are other types of "fasts" that include drinking juices or teas, that are really more like liquid diets. I think you can do these for a longer period of time, maybe a week tops. Some have done them for longer.
I think that fasts, all types, are really good for clearing your mind and your body. Whenever I've done one I've come to some realization about my life. I've gotten insight into something I need to start doing or some part of my life that needs work. They are also really helpful when it comes to ending cravings you might have for junk food.
And yes, fasts are good for losing weight too.
-- I want to be fit and healthy!!!