The bakufu (military government) in Edo controls the entire country, but the individual daimyo still exercise quite a bit of independence in the regional areas of Japan. They are allowed to pass their own laws and have quite a bit of freedom over how to run their provinces. Although the bakufu has the power to control or punish the daimyo if they get out of line, the most important source of power in the country -- the supply of rice -- is largely in the hands of the regional rulers (daimyo) and local leaders (jito).
In theory, the Shogun has control over all land in the country. Under the feudal system practiced in Japan, each daimyo is granted a certain area of land and allowed to collect all of the taxes and control all the economic decisions for that area. In practice, this gives the daimyo a lot of power, though they are obliged to pay a portion of their tax earnings to the bakufu and they must live in Edo for part of the year. The Shogun supposedly has the power to take away the land from a daimyo at any time, but in practice, this only happens if the daimyo is extremely disobedient or does something to offend the jito and other powerful landlords (such as Buddhist monestaries or temples) in their region.
The daimyo must pay all of their subordinates (samurai, clerks, retainers, and managers) from the tax rice they collect. Another portion of the tax rice goes to the shogun. The rest of the rice is sold, and the proceeds are used to pay for things like building roads or castles and extending irrigation systems. Tax rates vary from place to place, since each daimyo is allowed to set their own rate (so long as they pay the required amount to the shogun). For most farmers, the tax rate is about 50% to 60% of their total rice crop.
Most farmers have to work very hard, and live a fairly simple life. However, the tax rate is not actually as severe as it might seem. Even if the tax rate is 60%, this is based on the estimated size of the field and the amount of rice the daimyo thinks can be grown there. Most villagers know that, with hard work, they can produce much more than the expected amount of rice. Some farmers also clear new rice fields further away from the town, and then don't tell the tax inspectors about them. Farmers are also allowed to keep any vegetables and fruits that they grow on land that is not designated for rice production. Thus, although only a very small number of farmers could be considered "wealthy", most of them manage to live a fairly comfortable and stable life, as long as there are no droughts or floods to damage the rice crop.