Good question. TO is used as a preposition here. "He/she is out AT lunch" or "He/she has gone out FOR lunch" would definitely be better, but "He/she is out TO lunch" is idiomatic; I think it's probably a shortened form of a combination of "He/she IS OUT" and "He/she HAS GONE TO lunch".
Thank you so much for your informative teaching. I didn't think of the expression "has gone to lunch". (I thought there are two expressions such as "out to lunch" and "out for lunch".) You helped me a lot !
I often say someone is 'out to lunch' because they seem preoccupied mentally. They have gone, so to speak, out to the lunch room because they seem to be snacking on their own thoughts and rather ought to be attending to the duties at hand. It's suggesting this image: Someone comes and asks them what they are doing alone there in the room and suddenly they realize they are preoccupied. The look you