1.
Immediately, without delay, as in He paid us back on the nail. [c. 1600]
2.
Under discussion or consideration, as in The subject of the budget deficit has been on the nail for some time. [Late 1800s] The precise allusion in these expressions has been lost. Neither has any connection to
hit the nail on the head (see under hit the bull's-eye).