The origins of the slang term “cut the mustard” are shrouded in uncertainty, although there are a few creative theories. This term usually shows up in a negative sense, as in when something "doesn't cut the mustard"; in other words, it fails to meet expectations or doesn't meet a given need. Use of the term in a positive context, when something does cut the mustard, is somewhat unusual. Whatever the origins are, it appears to have entered common use in the early 1900s and seems to come from the United States.
One theory is that it is a reference to the literal difficulties of cutting mustard plants. Mustard often grows densely and has tough, woody stems that are difficult to slice, and the tiny seeds are hard and difficult to split. Another theory has to do with the traditional preparation of mustard for consumption. Mustard is naturally very bitter, and cooks commonly cut it with vinegar to take the bitterness off and preserve it so it can be kept at room temperature for an extended period of time. Failing to cut the mustard in either of these examples would result in unsatisfactory performance.
Other theories call upon older slang terms involving mustard. People have been “keen as mustard” since at least the 1600s. In the American West, the term “proper mustard” to indicate the real deal appeared in the late 1800s. Mustard in these cases appears to play a role as a superlative, something that exceeds expectations and is highly prized to spice things up. It is possible that cutting the mustard is related to these older examples of slang.
Some theorists suggest that the term is actually a corruption of “cut the muster.” This theory has some shortcomings, however. The idea of passing muster is an accepted slang term, referring to successfully passing a military inspection. Presumably a soldier who cuts muster doesn't show up at this inspection, in which case “cut the muster” would refer to a negative, rather than a positive. That makes this explanation unlikely; it is probably a back formation developed by those looking for similar slang terms.
Whatever its origin, “cut the mustard” appears to have contributed to another slang term, “cut it.” Much as when something doesn't cut the mustard, when something doesn't cut it, it falls short of expectations. This term appears to be a shortening of the older slang, since it appeared much later.