Social benefit accrues anytime a good moves out of the hands of persons who value it less into the hands of persons who value it more. Any voluntary exchange accomplishes this social benefit. The persons who might be mutually benefited from trade between them could be aided by a middlemen who buys the good from the person who values it less and then sells it to the person who values it more. The middleman generates a social benefit by bringing the trading partners together more efficiently than they could do themselves. Speculators are middlemen between persons in the present and persons in the future.
In Hazlitt’s example of farmers, the speculators buy grain from the farmers at harvest time (which, by increasing demand for grain, pushes grain prices up benefiting the farmers as sellers) and then they store the grain (relieving the farmers from the expenses of storing it themselves) and then they sell the grain at higher prices in the future (which, by increasing supply, pushes prices down benefiting users of the grain as buyers). As long as speculators deal more efficiently with the uncertainty of future grain markets than farmers would, the speculators generate a social benefit.