Well, stuff called "peat" forms from different things, but usually under similar conditions. In "peat bogs" the most common contributor is sphagnum moss, which contributes acidity to the bog to make things break down more slowly. However, most of the "peaty" deep soils that form do so primarily as a result of waterlogging. Waterlogged soil prevents the aerobic breakdown of organic matter, which is why it piles up into deep soils. This also occurs in the wet countries in Africa, some of which have very deep black soils due to the copious flooding they receive every year (which can wash out roads in a day). There are also some peat bogs in warmer climates, but sphagnum moss prefers cold climates and warm climate bogs are fairly rare. Swamps in warm climates have similar characteristics.
There are other deep soils which occur in warmer climates in the US, which formed from grasslands on top of loess (glacial rock dust sediment). These soils occur in dry and often hot places which are, at least in the US, prone to wildfires due to the dry climate. These soils are interesting in particular since the deep topsoil is no more fertile or productive than the loess it formed from.
For the purpose of growing food, waterlogged soils are obviously not the most desirable, so even if you can build deep soil that way it's not something you would really want to do on purpose. There do seem to be a few patterns to the process of forming deep, fertile soils, but the processes are not completely understood.
A few things that seem to play important roles:
-Aluminum and Iron are major constituents of soils formed from granite (alfisols, ultisols, oxisols) and their activity is toxic to plants and soil life. The lower the pH of the soil, the more active iron and aluminum become, with the prime example being the ancient oxisols of the Amazon basin.
Biochar raises pH which helps to suppress Fe/Al activity and when added to the rainforest clay it allows up to 27" of topsoil to form even under the hot, humid, and fairly well-drained conditions.
-Clay soils are made up of very fine particles which tend to compact and force out air, which can partly suffocate
roots and soil life, both of which require air for their growth.
-Sand is very coarse and does not hold water, which is also necessary for healthy
root and microbial life. It can also fail to drain and become waterlogged.
-Soils which include a large fraction of rock dust tend to be very rich in nutrients, and in technical terms they are geologically young compared to, say, weathered clay which takes many millions of years to form.
-Plant nutrient uptake is maximal for most plants when soil pH is between 5.5 and 7.
-Apparently a large fraction of soil carbon is released by living plants, rather than from dead material. Root mass also makes up half or more of the biomass contributed when a plant dies.
With favorable soil structure and chemistry, deep soils form under both grasslands and forest, although the mechanism of formation is different for each. In forests most of the organic matter comes from leaf litter and
wood falling on top of the soil, whereas deep soils under grasslands form as a result of the breakdown of roots from extremely deep rooted grass and legume species. Both are economically important sources of farmland.
For impoving soil structure,
diatomaceous earth is one of the best materials as it can hold pentiful air, water and nutrients, although vermiculite and certain types of biochar are similar. DE also contributes to the filtering of groundwater, probably to a greater degree than charcoal.