Gold and silver used to have value because our currencies were based on it. This prevented governments from printing money to inflate themselves out of debt. That is, a government with a fiat currency can devalue their own currency to also devalue the real value of their debt -- debt which is conveniently denominated in their own currency. Commodity based currencies prevented this sort of shenanigans because of the n…
Money supplies need to be inflatable to keep up with the creation of wealth, which isn't static. While prices rise quickly in response to an abundance of money (booms), they don't fall quickly in response to a lack of it (recessions) and this causes a lack of necessary liquidity that feeds into itself (bank runs) making the recession worse and worse. Prices are sticky, businesses don't like to lower them in accordance with what supply and demand would dictate.
Fiat money was an answer to this, it allows the Fed to inflate the money supply during hard times to keep the money supply liquid enough to keep trade going. Of course, they're supposed to deflate the money supply during boom times to stave off unnecessary inflation and prevent bubbles.