You use "in" for something that wraps around you and that you are actually inside: "The man in the grey flannel suit," "The woman in white" (here, "white clothing" is understand), "a wolf in sheep's clothing."
You use "with" for something that you are carrying, or attached to, or own, or are connected with. "The man with the briefcase," "the woman with the camera," "the man with the umbrella," "the woman with the brown dog."
Now, for reasons that I can't explain, we just happen to put eyeglasses as being in the second category. Culturally, we think of them as an object that's owned or carried, not a piece of clothing that we are inside. We also talk about "the man with blue eyes," "the woman with long hair," etc. So perhaps eyeglasses seem more "eye-like" than "clothing-like."