Assuming you want to cash out, obviously it is better to exercise when the option is in the money than at other times. But the optimal time is when the option is at its maximum profit. Unfortunately, no one know when that happens.
If you want to exercise the option to keep the underlying shares, doing so out of the money makes no sense because you can buy the shares for less. If the underlying stock is moving toward ATM or ITM and you think it will continue doing so, it is best to exercise as late as possible because holding the option is the same as holding the stock but without the capital investment. In that case the optimal time to exercise it at option expiration.
First, you would have to give us a reason why you "want" to exercise. It could be part of your trade plan, but I think you're a beginner and simply don't understand much about options.
Nobody uses exercise. If you want to own the stock, buy it.
I made over 300 options trades last year, not one single exercise. Forget exercise until you develop a trade plan, or until you've read your first book on options.
Lawrence McMillan is the options guru.
http://www.amazon.com/Options-Strategic-...
ITM, ATM, & OTM – when are options optimal to exercise?