distribution of treasure is an art not a science.
Why is that? Because if you give agency to players, then players can die, players can mismanage treasure, and players can miss treasure. If that's the case, then you cannot control wealth distribution, just influence it.
What is the point of treasure?
In all older editions of the game treasure makes up the largest percentage of advancement experience. This is eliminated in the later editions making treasure part of expected character power level, turning it from an award into a pre-calculated part of the player advancement curve. The purpose of placing treasure is to primarily provide a means of keeping score, and also providing advancement (socially in game, and as a means to increase personal power), reward, tools to solve problems, and as a method to further drive adventure and change the scope of the game.
Many of the techniques to follow will actually be detrimental to a encounter-heavy modern game (i.e. no empty rooms, all treasure is assumed to be found - say if your game book has a wealth by level table inside it). These techniques will merely obfuscate what treasure is for those games, which is a required power-up that fits into a slot so that the character can engage encounters appropriate to his level. Many of the advantages of 'treasure' have been internalized to the character build process.
The most efficient way to distribute treasure in these games it to give out treasure primarily in gold pieces and/or residuum, and be prepared for any other items to quickly be converted to their gold piece value so that characters can shop or craft for the items they need as quickly and simply as possible; while keeping in mind that any treasure you give the party that is useful to a member is effectively giving them the same reward that a character who can craft items receives - full value of treasure in gold.*
How Should Treasure Be Distributed in an Old School Game?
It depends on the desired pace of advancement and scope of the game. What is important is that there is enough treasure to provide for advancement in spite of player death (wasting treasure advancement), mismanaged treasure (taking too many henchmen along, spending too much money) and missed treasure.
My personal rule of thumb is to provide 4 times the amount of treasure the party needs to reach the next level distributed among the rooms with treasure (20%, or 1 room in 5). I usually start a campaign with around half a dozen adventure sites with perhaps 100 rooms among them. Treasure is rarely in coin, and often downplayed in encounters. A leather sofa (175gp), or a stone bust (1500gp) might be overlooked.
There are several different stances in regard to treasure distribution. Any distribution will take its clues from all three.
Naturalistic: What type of treasure would logically be here? Who owned this building? What does this culture of creatures collect? How strong are these monsters? What is the intelligence level of the monsters? What industries are nearby? Where is anything regarded as treasure likely to have come from?
Narrative: What level are the characters? How powerful are they currently? How much treasure do they need? Does your campaign require training? Does your campaign have taxes, tariffs and fees? What upkeep costs are you charging your characters? Are these magical items too powerful?
Classic: What does the bestiary say in regards to treasure usually found in the lair? Is it a horde? Do they carry Scrolls? Gems? Potions?
Some things to be kept in mind:
Different monsters will collect treasure in different ways. Some mindless monsters will horde treasure, others will leave it where it lies. Intelligent monsters will use treasure against the players, which is why it's important to determine the treasure found ahead of time.
Treasure will not be accumulated in simple gold piles - or even piles of coins. The treasure of a marauding band will include livestock, grain, personal goods, and assorted other objects. These categories are Art, Jeweled Items, Goods, Coins, Furnishings (including clothing), Gems, and Magic Items. There is extensive help in generating treasure of this type in DM1: Interesting Treasure Generation that you may find of assistance in generating this type of treasure.
I generally use a parcel system, meaning treasure is broken up into units of value, and that is the amount discovered. However, gems and art are important (and conversely rare) because of the possibility of their exploding value. Note that just because you have discovered a gem or painting worth 1,000,000+ gp, you only gain the experience when you turn that into coin, and good luck surviving the problems inherent in that process.
Random generation is an important part of this process, but by no means should it be used blindly and without thought. The randomness that's important is in things such as determination of the type of magical weapon, less so the bonus. How useful is that +5 Halbred, when no one is proficent in it? Randomly determining items makes choices like double and triple specialization meaningful for the players. Most 'troublesome' items upon a close reading of the rules come with a variety of subtle drawbacks and controls to their use. Determining these items randomly is acceptable, but remember some item use is limited by class. Some areas to be careful of unbalancing your campaign are with staves and rods, certain miscellaneous items (deck of many things, etc.) and artifacts. These can be made to work quite successfully, but each requires a change in focus in the nature of the campaign.
Next, my process of generating a hoard!
*It is perfectly acceptable to do the math and recalculate all encounters to be of a lower challenge and change the default assumptions of the game so that treasure is not an assumed part of character power, or using a system such as automatic bonuses on leveling or changing the game to an E6 scale. This is not the default stance of the systems however. The default stance is as above, you need the treasure to be powered appropriate to your level