I highly doubt that it drives the resins anywhere, but there is some basis in fact for this one, just the fact is about other plants, like food plants. The nail raises the iron content in the plant. When I was a kid in grammar school, 3rd or 4th grade, our teacher had the class do an experiment. Everybody brought from home, a potato, a jar it would fit into and either a couple of nails or toothpicks, depending which part of the experiment you were to play. Half the class used toothpicks to suspend the potato half down into the jar. The other half used the nails. We filled the jars with water and put them on the window sill. Everyday we observed the growth. The potatoes with the nails grew at a faster rate than the ones with the toothpicks.
I don't know how this would correlate to cannabis plants though.
Also, you'd almost have to have outdoor plants for that one. I grow pretty big plants for indoors (they harvest at 32-50" tall) and none of my plant's stalks are large enough to drive a nail into. Unless your plants are deficient in iron, you don't need it. Most people here are keen enough with what there crops need to be keeping up with the nutes.
I would not be surprised to find the originator of that advice was a 70s grower and the advice itself was from the 70s. You had to rely on what worked with normal plants would also work good for cannabis. People were thirsty for knowledge and good weed from their private gardens, and neither was plentiful at that time. Home grown weed was a joke! You only bought that if there was absolutely no other weed to be found.
This advice was properly forgotten from tribal knowledge, probably because it didn't really work with cannabis.