From Wikipedia about Wm. Underwood Co.:
Underwood first canned deviled ham in 1868 as a mixture of ground ham with seasonings; deviling would also be done with other meat and seafood products, including turkey, chicken, tongue and lobster. Deviling consists of adding such spices as pepper sauce, cayenne pepper, Dijon mustard, or chopped chili peppers. Deviled eggs are one well-known example of this process. The devil logo was trademarked in 1870 and it is the oldest food trademark still in use in the United States. The red devil that debuted in 1895 and started as a demonic figure evolved into a much friendlier version when compared to the original.
The older version, in use during the first half of the 20th century, can be seen in many old magazine advertisements, such as one from Woman's Home Companion, August 1921. It lacks the pitchfork and smile of the modern version, but has long fingernails or claws not found in the modern version. The barbed tail is in the shape of the letter W, and along with the lower-case M to the right of the devil forms the abbreviation "Wm.", for William, as in William Underwood. The lettering in the logo and on the can are also spouting small flames, reinforcing the spicy devil concept. In 2008, B&G Foods updated the devil logo by adding color to the previously all-red image. The pitchfork became black, and small amounts of yellow were added in the tail and horns, along with shading to add depth.