Q. Do you have idea why some many of the leaves on my locust tree are turning yellow?
A. The most frequent problem with locust trees, Idaho or black locust, is borers in the trunks. This will cause exactly what you're talking about, yellowing of leaves and leaf drop.
This is followed by branch dieback. Dieback of limbs may take a couple of seasons after the initial borer attack but if you are not looking for borer damage early, you will see leaf drop a couple of years into the attack.
Borers entered the trees usually where the tre is sunburned. This is normally on the west and south facing sides of the trunk or limbs. Horizontal limbs may be damaged on the upper surfaces as well.
Check the bark on the trunk or limbs see if it is loose. It may easily pull away from the trunk particularly on the south and west sides. Damage is usually on larger diameter parts of the tree.
Remove bark away from damage to areas and clean the damage down to fresh wood. You don't need to paint it but if you want it painted, paint it.