I wrote this post the other day but it looks like I posted it right as site maintenance started and the post didn't actually save. Guess I'll write it again. *le sigh*
Chemically, the idea with charcoal as a soil amendment is that it adds extremely high-porosity coarse soil particles that are low-to-non-biodegradable. In a nutshell, that more or les permanently gives the soil better CEC, water and air holding capacity, internal drainage, and boosts microbial activity. But of course there is a lot of nuance to all that.
As an aside, I use the term charcoal rather than biochar because to me biochar is a marketing term and not something that's actually referring to a different material or product. Charcoal is just manmade graphitic carbon produced from
carbonaceous material under pyrolysis. Different cultures in different parts of the world use all kinds of feedstocks for making charcoal, from wood to bamboo to animal dung, and it's made in all kinds of different grades and form factors. So to me "biochar" is just a marketing. Nothing wrong with that I guess, and at the end of the day it's all semantics so I'm not going to disagree if someone wants to use the term, I just don't use it myself.
Anyway, with that out of the way, charcoal is a fairly complex substance that is generally a majority of graphite and graphite-like chemicals arranged in extremely complex shapes with lots of structural elements and empty spaces that are partially determined by the feedstock. One can imagine for example the complex grid of plant cells in a piece of wood, with each cell having thick walls of lignin, and various kinds of vessels, rays, and pores getting to some degree broken up or fractured as the water in the cells vaporizes and some of the lignin and most of the sugars and simple carbs combust. Some cells will dry and and shrink before pyrolysis transforms the lignin, leaving little space inside the cells and causing pockets or layers of higher density, while other times the cells might burst before drying out, and similarly complex processes occur between different layers of tissue or along long pores, etc. And of course not all the lignin is transformed entirely into graphite, and there are plenty of other chemicals present as well aside from just lignin, so you end up with various different aromatic rings and tars and volatile compounds and weird chelates and salts forming. The end result being a substance that is majority graphite-like chemicals by weight, majority empty space by volume, and full of all kinds of different complex organic structures and highly reduced masses of carbon, plus salts, whatever esters and phenols and simple hydrocarbons that formed but weren't able to boil away or combust. And that substance has preserved some of the feedstock's structure, minus the water, but also altered it to various degrees, and so it a weird mix of honeycomb, fractures, walls, lumps, recrystallized carbon sheets, etc. That material is usually then ground down to something that's about the particle size of a fine gravel or a coarse sand.
What that gives you are large particles that have extraordinarily high porosity and a staggering surface area. All along that surface area you have a mixture of inert graphite-like carbon but also an array of different functional groups leftover from the incomplete pyrolysis process. And those functional groups provide ions, exposed hydrogens, electronegative oxides, aromatic rinds with odd electron affinities, and various other bonding sites. And of course all those pores will fill up with mixtures of air and water. Any solutes in that water will be very likely to find something in the charcoal to bond with, even if just weakly with hydrogen bonding or Van der Waals forces or simple hydration and dehydration reactions. All that surface area also provides a medium on which microbes can grow so while they can't typically digest the carbon in the charcoal itself, they can at least grow in and on it at much higher rates than in non-porous materials provided the water and air percolating through the charcoal have enough oxygen and dissolved matter to feed the microbes.
Initially, there will be very little water in the charcoal, and of course little oxygen either. Once exposed to the elements, either by being left out in a pile on the ground, mixed into the soil, or dunked into a container full of water and fertilizer, oxygen will start to diffuse into the charcoal and water will make its way in as well. A lot of the ash still present in the fresh charcoal will immediately start dissolving into that water, and so typically there will be an initially very high pH as all those ions in the ash, mostly K+ but I would assume some other alkaline metal ions as well, dissolve into solution. Once that process is mostly complete the charcoal should have a pretty close to neutral pH, but it can take a while for that to happen. What will also happen during that process is that most dissolved nutrients like nitrates and calcium ions etc. will bind to or just physically get trapped deep in the pores in the charcoal, so the charcoal will quite literally be sponging up any free nutrients that come into contact with it, all the while dumping excess alkaline ions from all the ash in it.
Hence why people always "charge" charcoal by mixing it with water and some kind of fertilizer, or "age" it by exposing it to the elements.
Once that process is finished, you have these coarse particles that aren't quite so chemically active as before, since they aren't sponging up water and dissolved materials while also leeching ash and alkaline ions. You still have most of those initial bonding sites, but a lot of them aren't in such reduced states anymore or aren't in some high-energy state leftover from the burning process, etc. and so while you still have a lot of bonding sites and a very high CEC, the charcoal is now closer to an equilibrium state rathe than just gobbling up everything that it touches. So if for example there's a sudden increase in nitrates, the equilibrium will shift and the charcoal will bind up a lot of that excess N, and then slowly that N will get released back. In short, you a have a substrate that it great at holding nutrients and slowly releasing them.
And since these particles are both large and porous, they have great hydrological properties. Large soil particles have large gaps between them, so water can quickly drain through and waterlogging isn't usually an issue (initially, it can waterlog pretty bad, but that's because the ash can form a pasty layer that blocks water from escaping, once that ash it gone, it drains great). But, because of the porosity, a lot of water will also get absorbed and held by the charcoal. And with less air exposure than the gaps between the particles, that water evaporates extremely slowly, unlike the water on the surface of sand particles for example. And deeper in the pores or in smaller pores, the surface tension of the water and the adhesion of the water will keep it locked in there for long periods of time, only releasing it very slowly, so the particles will continue releasing a little bit of water for a very long time after they are wetted. Not all the pores will fill with water, and some will be big enough that they empty out quickly and fill back with air, so even after a heavy wetting, there will almost always been some air left and some oxygen. The charcoal particles then are almost always at least somewhat moist and somewhat oxygenated, which is great for microbes, fungi, and plant roots.
Now, in a lot of ways this is very similar to soil organic matter. In particular, the nutrient, water and air holding capacity. Less so regarding drainage since organic matter can waterlog pretty badly. Where it's different is regarding microbial life. Soil organic matter feeds microbial life as well as providing a media for it to grow on, while charcoal, while arguably providing an even better media than the often sludge-like organic matter, does not actually feed the microbes in any significant way. Depending on the climate, that can be a good thing.
In cold or dry climates, the rate of decomposition of soil organic matter back into CO2 is pretty low, especially for well degraded stuff that's already had all the sugars and starches and other easily digested chemicals eaten up by microbes. However, in warm, humid climates, the degradation of soil organic matter can happen at one or two order of magnitude faster. So a few tons of nice, rich, black compost that would fortify a garden in New England or the PNW for ten or even a hundred years will, in the Deep South or the tropics, be turned back into CO2 within a single growing season. That's a problem.
It's a problem for two reasons. First, because it means that traditional soil building techniques are much less effective in subtropical and tropical climates. Second, it means that any nutrients in that organic matter will be released comparatively quickly, so anyone dumping enough compost on their garden in Tampa to keep the soil black and rich like in a Welsh market garden is going to be poisoning the creek downhill from them with nitrates and phosphorous.
Charcoal solves that problem. Charcoal takes eons to degrade, mostly through abiotic means like weathering.
So that's the chemistry of charcoal as a soil builder.
Depending on your potting media, you probably only need something like 5-10% charcoal to make some difference, but I've not run actual tests to see. But those are the numbers I've most often seen in studies and from people who have used it a lot. Higher percentages could have use cases, such as for succulents and other plants that require very good internal drainage, or in ground where external drainage might be poor, but you'd really want to make sure the charcoal was not at all fresh.