Thanks for the chance to help. I am an attorney with over 12 years military law
They can...that is, the commander has the authority to limit access to base installations if they desire.
And they can do so, if there is evidence to support the decision.
Now...the commander can not be arbitrary. That is, the commander must be fair and impartial in their decisions. So, if you believe that in this case, the commander was not treating you (your son) fairly, then the service member can request to speak to the commander directly. IF, after speaking to the commander you still believe the commander is not treating you fairly, the service member can file an IG complaint against the commander...this would elevate the matter up the chain of command to the next commander for review.
But I caution, the commander has this authority...they have the power to ban individuals from the exchange without a formal hearing. So unless there is evidence that the commander is acting unfairly, a complainant is not likely going to help.
Sorry to have to bear bad news.