My son used to have a similar problem. When he was quizzed at home he got all the answers right, but at school he would often do very poorly on tests. We also noticed that when we just casually asked him questions about his knowledge he did quite well, but when we were upset or he was in a stressful situation he was unable to give correct answers. It was like his brain just froze when he was stressed. That problem got even worse as he anticipated the stress of being tested, and being unable to answer and getting into trouble for it.
It might be that if the teachers can alter his testing situation so that it feels less stressful, he will be able to recall the answers better. The teachers at my son's school let him sit alone in a quiet room with a snack, and told him he could take his time. That allowed him to feel less stressed and he was able to do well on tests. This made him feel less anxious about tests, and he was eventually able to do well on tests in a normal classroom environment.
Of course, it might also be that your son isn't doing well because he just doesn't see any reason to try that hard. Perhaps if you worked out some sort of incentives...every time he gets 90% (or some other reachable but challenging level) on a test, he gets a treat. Or a "star point" which he can accumulate to redeem for prizes. For example, if he gets, say, ten star points you will take him out to McDonald's as his prize. BTW, positive incentives are far more effective than negative ones. It's better to reward for success than to punish for failure.