The causes of the Great Depression were many and complex. Pinning this financial disaster solely on the excesses of the Roaring Twenties would be inaccurate. Other causes contributed to the Great Depression, such as the stock market crash, deflation, an imbalance in the gold standard, and harmful tariff policy. That being said, the Roaring Twenties certainly was one factor in the economic downturn.
One way that the excesses of the decade fueled the Great Depression was through speculative bank loans. Many of these loans were spent on stock speculation. In other words, people were borrowing vast sums of money from banks to buy stocks, not giving much consideration to the true value of those stocks. There were some warnings from certain economists, particularly within the Federal Reserve, as to the unsustainability of this practice. However, they were ignored in light of the immediate gains people saw at the time.
The earnings that many were making from their stock investments created a feedback loop of spending and speculative investing. Throughout the decade, production and spending increased many times over. This led to a soaring middle class at a level unknown in previous generations.
However, the economic prosperity was sprung from unsteady foundations. With so much built on mere economic speculation and paid for with borrowed money, it couldn't survive the stock market crash of October 1929. The crash itself was not the sole cause of the Great Depression, but it was a significant factor.
In short, the Roaring Twenties led to consumer and investor confidence that far outpaced reality. It created the illusion of fortune that, in many ways, did not really exist. This set the stage for the disaster known as the Great Depression.