Cracker is a slang term with innumerable meanings. Today it is most often used as a more technical term for a malevolent hacker, but in the past is was used as slang for a bean (1900), a dollar (1933), a remarkable person (1863), or most frequently, as a derogatory term for a white person. The first recorded use of these sense was in 1766, when it was used to refer to the lawless backwoodsmen of the American frontier.

"I should explain to your Lordship what is meant by Crackers; a name they have got from being great boasters; they are a lawless set of rascalls on the frontiers of Virginia, Maryland, the Carolinas, and Georgia, who often change their places of abode."

-- From a letter dated June 27, 1766 from Captain Gavin Cochrane to the Earl of Dartmouth.

This usage probably comes from the use of crack from the 1500s onward to mean a boast, the same meaning that gave us the phrase 'not what it's cracked up to be' and the word 'wisecrack'. It continued to be used to refer to a particularly unsavory country bumpkin until at least the 1980s, and may well still be used in this sense today, although I have not heard it used so myself. It has much the same meaning as redneck or perhaps white trash, and implies that one is loud, uncouth, unhygienic, untrustworthy, poor, and has a strong back-country accent.

In the early 1920s it became common for cracker to refer instead to a white racist (that is, a white person who was racist against blacks) by African-American writers during the Harlem Renaissance. By the late 1960s, the term was widely recognized as one of the more offensive terms specifically, and for the most part, exclusively, used by black persons to insult a white person. (Honkey was also popular during this time.) This sense largely faded out by the 1980s, although it is still used in this sense today. These days it is generally not seen as too terribly offensive, and has lost some of the overtones of calling someone a racist. It is, however, still rude.

While cracker has been used at varies times and places in America to mean something good, nice, or impressive, including the famous crackerjack, this usage has fallen out of popularity. Wertperch informs me that it is still used in the positive sense in the UK. "'Cracker' is used in parts of the UK for something really good, or an attractive woman. 'That's a cracker!' means a superlative; 'She's a cracker!' means she's just gorgeous."