"humorous," 1756, from fun (n.) + -y (2). Meaning "strange, odd, causing perplexity" is by 1806, said to be originally U.S. Southern (marked as colloquial in Century Dictionary). The two senses of the word led to the retort question "funny ha-ha or funny peculiar," which is attested by 1916. Related: Funnier; funniest. Funny farm "mental hospital" is slang from 1962. Funny bone "elbow end of the humerus" (where the ulnar nerve passes relatively unprotected) is from 1826, so called for the tingling sensation when struck. Funny-man was originally (1854) a circus or stage clown.
"make fun of, tease in a good-natured way, attack with raillery," 1660s, from French railler "to rail, reproach" (see rail (v.1)).