I. The Cyanotype Reaction:
The key reactant in the cyanotype process is a water-soluble Iron (III) (that is, Ferric) compound, which must undergo a redox reaction to release Iron (II) (that is, Ferrous) ions under exposure to light, and only under exposure to light. These Ferrous ions then react with Potassium Ferricyanide, the second reagent in the sensitizer, to produce Prussian Blue, a mixed-valance, dark-colored compound which will form the image. Critically, Prussian Blue is insoluble in water, allowing the unreacted sensitizing chemicals to be washed away from the substrate with water, effectively “fixing” the image and rendering the finished cyanotype light-stable and suitable for viewing.
The classic photosensitive, iron-reducing compound is Ferric Ammonium Citrate Dihydrate, technically Pentaammonium Ferric Dicitrate Dihydrate, or [NH4]5[Fe(C6H4O7)2]·2H2O. The reductant in this complex is derived from Citric Acid. Traditionally, Citric Acid is thought of as being triprotic, given that it has three carboxylic acid groups, and can donate three protons per molecule into aqueous solution:

The reality is more complex: depending upon the pH of a solution, different species will dominate, as is typical of polyprotic acids, strong or weak. Below pH 3.1 (i.e., in the presence of strong acids), free citric acid predominates. Between pH 3.1 and 4.8, the mono-deprotonated form is the main species, with the central carboxylic acid group (i.e., the one vicinal to hydroxide) being most-often deprotonated, since the electron-withdrawing effects of that hydroxyl group boost the acidity of this functional group over others. From pH 4.8 to 6.4, a double-deprotenated form predominates, and from 6.4 to ~10, we see mainly the triply-deprotonated form:

However, when we examine the empirical formula of Ferric Ammonium Citrate, we see that the charge cannot be -1, -2, or -3. Specifically, the five Ammonium ions have a charge of +1 each, for a net charge of +5 from Ammonium. The single Ferric ion has a charge of +3, so the total charge from cations is {+5} + {+3} = +8, which needs to be offset by a mere two anions derived from citric acid:
[NH4]{+1}5[Fe{+3}(C6H4O7)2]·2H2O
This implies a +4 charge on each citric anion, and indeed this is a result of deprotonation of the central Hydroxyl group. Under strongly basic conditions, citric acid becomes effectively tetraprotic, with the central Carboxyl drawing electron density away from the vicinal alcohol. An examination of electron density (blue indicating negative, and red indicating positive) shows this effect:

The full distribution of Citric Acid species in solution, extending to high pH, is as below. Ammonia is a sufficiently-strong base (though only barely) to convert the acid to a (-4) ion, as in Ferric Ammonium Citrate:

Crystallography shows that solid Ferric Ammonium Citrate consists of central Fe+3 ions, each of which is coordinated thrice to each of a pair of Citrate-4 ions, coordinating to the central Carboxyl, the Hydroxyl, and one of the two peripheral Carboxyl groups. The non-iron-coordinated peripheral Carboxyl group of each Citrate ion coordinates to Ammonium, leaving a core complex as shown below, accompanied by three additional (but uncoordinated) Ammonium ions and two uncoordinated water molecules, which are not shown below:

The three-dimensional structure is approximately as follows, with the Citrates adopting a confirmation to chelate the Iron center:

Under ultraviolet irradiation, one of the Citric Acid-derived Carboxyl groups coordinated to Fe+3 will transfer a single electron to the Iron center, reducing it to Fe+2 (the Ferric-to-Ferrous reduction), producing an R-COO• radical. Based on the fact that the cyanotype reaction works with carboxylic acids that do not contain Hydroxyl groups (ex., Oxalic Acid), but does not work with compounds that contain only lcohols and no carboxyl groups (ex., Ethanol), I suspect that the reduction specifically occurs with an electron transfer from R-COO–, producing an intermediate species that is similar to radicals generated by the disproportionation of, for example, benzoyl peroxide. This radical quickly abstracts an electron from a neighboring carbon-carbon bond, producing CO2 and leaving an organic radical derived from Citric Acid. We see the Carboxyl-bearing carbon (color-coded blue) oxidized to CO2, an increase of +1 in oxidation state that offsets the -1 change in iron’s oxidation state, while the neighboring carbon (color-coded green) bears the Methylene radical:

Leaving a chemical reaction with a radical unquenched is deeply unsatisfying, something like seeing an unpaired parentheses or quotation mark, so we can suppose that two equivalents of this methylene radical condense as below, though side-reactions are possible. What is important is that the oxidized derivatives of citric acid that are formed will still lack long chains of conjugated pi bonds (hence being uncolored under visible light) and will still be bristling with hydroxyl and carboxyl group (hence being water-soluble and easily washed out during the fixing step):

I haven’t seen the cyanotype reaction described in this level of detail with respect to reaction mechanism in the literature, and so I’ve worked out the reaction mechanism mainly by studying reductions by Ascorbate (the anion of Ascorbic Acid, i.e., Vitamin C). Ascorbate is of major significance in medicine, given its role as a free-radical-quenching agent, an “antioxidant” (i.e., reductant of oxidizing species), and its significance in essential biological processes, especially the synthesis of collagen and certain enzymes and transporters essential to metabolism. I have a bit of a funny story regarding ascorbic acid – regarding its significance as Vitamin C. When I was a University student, friends of mine would often come to me with medical questions and concerns – not that I was a physician, or studying medicine, but I was a student of chemistry, and had an interest in pharmacology, and a father who was a physician, so I at least knew more about medicine than the average man. Of course, this certainly this didn’t qualify me to give medical advice, but friends came to me nevertheless for the same. I had one friend who came to me in tears, because the previous night, he had been drinking and kissed a young women whom he wouldn’t have otherwise, and regretted it when he awoke sober. Drinking Ethanol, or, really, consuming any psychoactive drug: rarely a recipe for good decision-making about romance, finances, or anything else. He confessed to me that he was terrified he had contracted scurvy, and when I interrogated his concern, he revealed it was because he knew scurvy was once common among sailors, who were known for promiscuity, and presumably that included kissing in addition to all else. I assured him that, unless the young woman had somehow sucked all the Ascorbic Acid from his body, he had nothing to be concerned about. He calmed down and went back to being hungover.
Unsurprisingly, there’s much more research into Ascorbic Acid than the cyanotype process
The reduction of Fe+3 to Fe+2 weakens the coordination between this ion and deprotonated carboxyl and alcohol groups, consistent with hard/soft ligand theory; the Fe+2 ion has lower charge concentration compared to its atomic radius, and is thus “softer” than Fe+3, and hence less-compatible with carboxyl and alkoxyl ligands, both of which are “hard” due to the high concentration of negative charge on oxygen, a relatively low-radius element. As a result, Fe+2 is freed from the citrate complex upon reduction and can then react with the second key ingredient in the cyanotype solution: Potassium Ferricyanide.
In isolation, Potassium Ferricyanide is a water-soluble ferric (Fe+3) compound, K3[Fe(CN)6], which in solution consists of free Fe(CN)6-3 ions, each of which is accompanied by three K+ ions. We see that the cyanide ligands are all bound to the ferric centers on the carbon side:

The cyanide anion, :C≡N:-1, has lone pairs on both nitrogen and carbon, and can hence coordinate at either (or both) of these atoms. The binding on the carbon side is again to be expected from hard/soft ligand theory, as carbon, with a molecular weight of 12 g/mol, is smaller in radius and hence “harder” than nitrogen (14 g/mol) at equal charge, given greater charge concentration. Upon exposure to Fe+2, the cyanide ligands from Potassium Ferricyanide additionally coordinate to ferrous ions, producing the mixed-valence compound Prussian Blue, Fe{+3}4[Fe{+2}(CN)6]3, where we see a ratio of 4:3 between ferric (Fe+3) and ferrous (Fe+2) ions. Although Prussian Blue has been manufactured and used as a pigment since the early 1700s, its structure is highly complex and still not fully understood, in part because its extreme insolubility means that, as the compound forms, it is prone to develop lattice irregularities, because it transitions from solution-phase to solid-phase so quickly that not all ions or ligands have time to find their “proper” place in the structure. Prussian Blue also exists as a series of stable hydrates, and it is clear that water molecules, in addition to cyanide ions, are important ligands. A representative unit cell is below: