The first thing that comes to mind is that your son learned he doesn't have to do unpleasant things if he pretends not to understand. So "Do you want a cookie?" gets a response, "Don't touch the glass!" doesn't. It might even be a certain tone of voice (for example, the one your wife uses when she wants him to do something) that's become a cue for him to ignore whatever is said.
This should be fairly easy to check, since the pattern becomes obvious when you consider what he likes and doesn't like. You can also test it by presenting him with two options he likes and let him pick which one he wants. Start simple, for example hold up two plates so he can't see what's on them, tell him there are cookies on the one plate (demonstratively look at that plate) and icecream on the other plate (look at the other plate), then let him point at the one he wants. Substitute his favorites (can be toys too) for the cookies and icecream of course.
If he responds clearly to this (when he's motivated), it's likely he doesn't see the need to listen or talk to get what he wants. So stop giving him what he wants until he "speaks" to you and listens to you. He will likely get angry and frustrated at this sudden change, but if you are consistent he will learn the new way to get what he wants before long.
If he doesn't respond, I would advise you to investigate further. Can he hear you well? Does he react to sounds behind him? Does he make eye contact when you promise him (cookies) and follow your gaze when you tell him where the (cookies) are? That kind of interaction should already be there, long before speaking. Also, how does he express his needs to you in general?
If you have any doubts, ask a professional.