Anxious anticipation. Nervous awaiting a result. The image of both pins and needles (ouch) portrays a very uncomfortable feeling. It is also a physical feeling as when your arm goes to sleep. (Compare to On the edge of one’s seat or Nervous Nellie.)
“The courtroom was quiet and we were all on pins and needles awaiting the decision by the jury.”