The main advantage of commodities to a largely stock and bond portfolio is diversification and the main disadvantages are investment complexity and low long-term returns.
Let's start with the advantage. Major commodities indices and the single commodities tend to be uncorrelated to stocks and bonds and will in general be diversifying especially over short periods. This relationship can be complex though as
- Oil and non-precious metals often see the demand fall in a crisis
- Agriculture (especially non-meat) tends to have fairly consistent demand as people need to eat
- Precious metals often have high demand in a particularly bad crisis
Supply can be even more complicated (think weather) so diversification may or may not work in your favor over long periods.
However, trading in commodities can be very complex and expensive. Futures need to be rolled forward to keep an investment going. You really, really don't want to accidentally take delivery of 40000 pounds of cattle. Also, you need to properly take into account roll premiums (carry) when choosing the closing date for a future. This can be made easier by using commodities index ETFs but they can also have issues with rolling and generally have higher fees than stock index ETFs.
Most importantly, it is worth understanding that the long-term return from commodities should be by definition (roughly) the inflation rate. With stocks and bonds you expect to make more than inflation over the long term. This is why many large institutions talk about commodities in their portfolio they often actually mean either short term tactical/algorithmic trading or long term investments in stocks closely tied to commodities production or processing.
The two disadvantages above are why commodities are not recommended for most individual investors.