Sometimes, with thinly-traded options that are near expiration, the bid is less than intrinsic value and you can't sell them for anything higher than that. For instance, I was trying to sell DJ 45 puts for $5.00 and didn't get filled until DJ was down to $39.86. In these cases, it makes sense to exercise, after buying or selling the underlying first so that you can lock in the desired price and the exercise will leave you flat.
As to your specific question: I've never knowingly exercised options when I didn't have enough money to cover the stock, but anecdotal evidence is that brokers that do not issue margin calls will simply liquidate the stock early the next morning to get your account compliant. This may result in a big loss if the stock gapped down at the open.