The paper deals with the problem of measuring the moisture of agricultural soils by an accurate, on-site, real-time method. The idea is to estimate the moisture by measuring the speed of sound in the medium: the main issue is therefore to determine a precise relationship between the two quantities. To this purpose, the Brutsaert's model for elastic waves in porous media is applied, taking into consideration different kinds of soil of common interest in agriculture. The authors have derived the speed-moisture curves, the conditions for the actual validity of the curves, and the suitable sound frequency for performing the measurement, for a wide range of agricultural soils in different physical conditions. The paper results are therefore the basis to realize an inexpensive and accurate moisture sensor for farmers.