The database of professor Rogers (1887), which includes wheat prices in England in the Middle Ages, was used to search for a possible influence of solar activity on the wheat market. Our approach was based on the following: (1) Existence of the correlation between cosmic ray flux entering the terrestrial atmosphere and cloudiness of the atmosphere. (2) Cosmic ray intensity in the solar system changes with solar activity, (3) Wheat production depends on weather conditions as a nonlinear function with threshold transitions. (4) A wheat market with a limited supply (as it was in medieval England) has a highly nonlinear sensitivity to variations in wheat production with boundary states, where small changes in wheat supply could lead to bursts of prices or to prices falling. We present a conceptual model of possible modes for sensitivity of wheat prices to weather conditions, caused by solar cycle variations, and compare expected price fluctuations with price variations recorded in medieval England. We compared statistical properties of the intervals between wheat price bursts during the years 1249-1703 with statistical properties of the intervals between the minima of solar cycles during the years 1700-2000. We show that statistical properties of these two samples are similar, both for characteristics of the distributions and for histograms of the distributions. We analyze a direct link between wheat prices and solar activity in the 17th century, for which wheat prices and solar activity data (derived from 10Be isotope) are available. We show that for all 10 time moments of the solar activity minima the observed prices were higher than prices for the corresponding time moments of maximal solar activity (100% sign correlation, on a significance level < 0.2%). We consider these results a direct evidence of the causal connection between wheat prices bursts and solar activity.