The physical changes to a deciduous tree should be seasonal and predictable. The tree's foliage should start to wilt in fall, with leaves changing color before being discarded. It can be concerning when this cycle spontaneously changes and takes on an element of unpredictability. Why is your deciduous tree shedding its leaves in the spring and summer months?
Has it been an especially dry spring and summer so far? Inspect the soil around the base of the tree. If the ground is conspicuously dry (and even cracked), this is an indication of how much moisture the tree's root system is able to derive from the surrounding soil—which is clearly not enough. You may want to test soil density if you have a pitchfork or a smaller gardening fork. Proceed with caution, as you don't want to puncture the tree's roots.
Without sufficient moisture, the tree will understandably struggle. It can start to prematurely shed leaves as means of self-preservation, as it can't obtain the required nutrients to maintain the growth of its foliage. The drought stress affecting the tree can typically be reversed by judicious watering. Please take care not to overwater the tree, since this can ultimately cause similar problems to drought stress.
Applying more water than the tree needs can lead to a permanently sodden root system. This is a problem if you've been experiencing prolonged rainfall. This saturation reduces the tree's ability to draw in oxygen and other nutrients from the soil, and similarly to drought-induced stress, the tree cannot maintain its foliage, and so will begin to drop leaves—regardless of the season. Without ample time to dry out between receiving water, the tree's root system may ultimately begin to rot.
It's arguably more straightforward to rejuvenate a tree that's affected by drought rather than one that has experienced too much water. You don't have control over inclement weather, but it's easier to counteract drought than flooding. Sodden, rotten tree roots also make the tree more vulnerable to fungal attacks and other parasitic invasions. If the tree's foliage doesn't rejuvenate itself even once the ground has had time to dry out, call a tree services company for assistance.
Strategic fertilization and judicious pruning may help to restore the tree—reducing the foliage it must supply with nutrients. The tree will be reduced in scope, yet you should begin to see signs of recovery by the next spring. However, a professional assessment from an arborist is essential for determining whether the tree can be saved—particularly in the case of fungal or parasitic infestation.
Sadly, it might be that the tree's root system is too far gone for recovery to be possible, and tree removal may be the reluctant (although most practical) recommendation.
For more info about tree services, contact a local professional.