Law of demand for individual buyers follows from diminishing marginal utility
Consider a commodity and a single buyer (individual or household) that can choose how much of the commodity to consume. Suppose, further, that the marginal benefit derived from the household for every additional unit of the commodity consumed is a decreasing function of the quantity consumed. In other words, the utility function is a concave function of the quantity.
Then, assuming a utility-maximizing buyer with a large income, the quantity demanded by the buyer at a given price is precisely the quantity at which the marginal utility equals the price. In particular, the demand curve is simply the household's utility curve for the commodity. Thus, the law of demand holds: as price decreases, demand increases.
Utility functions that are not concave
Note that it is possible that initially, a commodity has a marginal utility that is initially increasing, and then decreasing. In other words, the graph of the marginal utility is initially rising and later falling. Note that in this case, the individual utility-maximizing buyer will never choose to buy a nonzero amount less than the amount where marginal utility is maximized, hence the result still holds, albeit, there is a sudden discrete jump in the quantity demanded when price falls to the peak marginal utility.
Factoring in the income and substitution effects
In practice, the limited income that the household or individual buyer has access to, and the presence of substitute goods, interacts with the phenomenon of diminishing marginal utility. If the buyer has a large income and there are no substitute goods, the buyer will keep buying more of the good till the marginal utility equals the price. However, if the buyer has other substitute goods in mind, then the buyer will buy the quantity of the good such that the marginal utility from buying more of the good equals the marginal utility from buying more of another good. In other words, it is the opportunity marginal utility from other goods that matters.
Implicitly, in our formulation of diminishing marginal utility, the assignment of the monetary value to the marginal utility for each unit of consumption is done using a general estimate of opportunity marginal utilities and the monetary price tags on them. A pure utility theory perspective would eliminate monetary values on marginal utilities completely and simply treat utils, compare them across all the different items being consumed, factor in the market prices and constraints on income, and then determine a consumption function that equalizes marginal utilities. This has the advantage of combining the income effect, the substitution effect, and diminishing marginal utility.
For multiple buyers
While the law of demand for individual buyers is explained in terms of diminishing marginal utility, and the demand curve for an individual buyer is simply the (downward sloping) marginal utility curve, there is another reason for the law of demand in the case of multiple households. This is the heterogeneity in preferences, income and other factors that leads to a difference in their reservation prices. The lower the price, the greater the number of people whose reservation price it is below. Further information: Law of demand for multiple buyers follows from differences in reservation prices
Predicting second derivative behavior for individual households
There is no uniform, generally accepted principle that would determine the second derivative (i.e., the rate at which the price-elasticity of demand itself changes with changes in price). Assuming a concave utility function, the demand curve for an individual household equals the marginal utility function. Hence, questions about the second derivative of the demand curve translate to questions about the second derivative of the marginal utility function, which in turn translate to questions about the third derivative of the utility function.
In order to maximize utility, the buyer will choose to keep buying more of the quantity until the marginal utility from purchasing an additional unit equals the price of the good. Since the marginal utility is assumed to be a decreasing function of quantity, we see that quantity increases as the price of the good falls.
Graphically, the demand curve for a given household equals the marginal utility curve as a function of quantity.