I believe the title says it all. At my table we have been applying it at step 4 right before a character/creature would take damage and I believe that is correct based on page 272 which states, "Every item has a Hardness value. Each time an item takes damage, reduce any [emphasis added] damage the item takes by its Hardness. The rest of the damage reduces the item’s Hit Points."
This topic has come up a few times also in relation to some of the creatures I have used in my campaign that have Hardness listed in their stats. There is some (well...more that some) debate here if hardness acts like a resistance to all. I do not believe that is the case based on the description of hardness in the core rule book and the bestiaries. If that were true then there would not be hardness AND resistance.
In my readings thus far, Hardness (whether item or creature) is based on what a thing is made of. Something natural like wood, types of metal, leather, cloth, etc have a hardness. Resistances are a type unnatural/magical damage resistance usually with much more specificity, though sometimes very broad. Hardness specifically says "...any damage..." in its description.
There does seem to be quite a bit of confusion here and on the internets and it would be nice to get am official clarification from Paizo.
Thanks.