This response is known as striking the "funny bone". The name funny bone could be from a play on the words humorous and humerus, the bone on which the medial epicondyle is located, although according to the Oxford English Dictionary, it may refer to "the peculiar sensation experienced when it is struck".
The ulnar nerve is vulnerable because it passes close to the surface along the back of the bone. Striking the medial epicondyle causes a tingling sensation in the ulnar nerve.