1. Initials of Some of the Early Operators.
This theory says that one of the first amateur stations was the Harvard Radio Club, set up by Albert S. Hyman, Bob Almy and Poogie Murray. They started by referring to their station by their last names, but over time shortened in stages until it became just “HAM”.
In those days some amateurs had better signals than commercial stations. This, of course, upset the professionals, who appealed to Congress. During the hearings for a bill to regulate amateurs, one of the above hams made an impassioned plea, stating that the bill would essentially cripple amateurs, due to the license fees and other requirements the bill imposed. Some congressmen were so impressed by the testimony that the “little station ‘Ham’ became the symbol for all the amateur stations in the country crying to be saved from the menace and greed of the big commercial stations”.
This theory is provided in both references below, and then refuted by the second reference.
2. Abbreviation of the term “amateur”.
A few people have speculated that “ham” is just an evolutionary shortening of the term “amateur”. “Amateur” becomes “am”, becomes “ham”.
3. Pejorative Term from the Professionals
According to the ARRL, “In those early days, every station occupied the whole spectrum with its broad spark signal. Government stations, ships, coastal stations and the increasingly numerous amateur operators all competed for time and signal supremacy in each other's receivers. Many of the amateur stations were very powerful. Two amateurs, working each other across town, could effectively jam all the other operations in the area. Frustrated commercial operators would refer to the ham radio interference by calling them ‘hams.’” This because professionals referred to any Morse Code operator that wasn’t very good, professional or otherwise, as “ham-fisted”. And, of course, amateurs were never good, at least in the professional’s eyes. “Amateurs, possibly unfamiliar with the real meaning of the term, picked it up and applied it to themselves. As the years advanced, the original meaning has completely disappeared.”
4. Other Possibilities
Some other theories are provided in the Wikipedia article Etymology of ham radio.