How big/old is the tree?
Was it perfectly healthy before you pruned it? Green leaves all over?
How long between pruning it and this leaf yellowing/drop? Really overnight? I don't think it is possible for leaves to yellow that fast.
Pruning shouldn't cause leaf yellowing, it doesn't make sense. Usually this kind of thing is too much/not enough water, insect attack, root or trunk damage, or very severe mineral deficiency. None of these happen overnight.
Once I killed a guava by spraying it with too high of a concentrate of petroleum oil, all the leaves blackened and fell off within a week or two. You didn't mention spraying anything here.