Mysterious suzuki air conditioner

My Suzuki XL-7 2008 AC sometomes only blows hot air. If I turn the car off and then later turn it back on, it starts workinga gain. Why?