The hazelnut, from the hazel tree, is a particularly choice nut for confections and, like most nuts, is made into a fine butter and oil.
Interesting traditions from folklore and myth associate the use of hazelnut limbs with water divination, and the tree itself as protective from thunder and lightning storms. The nuts are associated with fecundity and forecasting marital longevity.
When Captain Wentworth jokingly compares Miss Musgrove to a hazelnut, he is flattering her strength of will, and the reading audience most likely would have known of its associations. As the narrative progresses this is shown to be ironic.