Hi OP, you may be interested in this thread
And, incidentally, here's a link to that FAQ section mentioned by /u/souHad
I can't link to it because I'm on mobile, but the FAQ has a number of threads about the Sea People. In fact, I think somebody else asked the same question just a little earlier today haha.
I'd argue that this is the wrong question. We know what caused the collapse, widespread warfare and famine caused by drought. We don't know many of the exact details of the war or the famine and the specific events on the way to collapse. But I think the real question is: why did warfare and famine cause such a profound regional collapse? Keep in mind that we are talking about honest-to-goodness post-apocalypse situations here after the collapse. Populations fell substantially. Governments and trade evaporated. And the level of technology fell back significantly. So much so that it took hundreds of years for the region to recover and for new cultures, economies, and governments to rise up out of the ashes.
However, there are almost countless examples of widespread warfare and even massive famines that are not associated with the same level of civilizational collapse we see in the end of the Eastern Mediterranean Bronze Age. Which raises the question, what made Bronze Age civilizations in that region so vulnerable to such a collapse? And I'd say that the most likely answer is excessive centralization. Bronze Age governments in the Eastern Mediterranean were centralized to a degree that is hard to fathom today. The ruling governments of the major states were the axis around which trade, economic activity, food production, and public works rotated. It was almost inevitable that there would be a collapse, it was mostly just a matter of time until a sufficiently major calamity would trigger it.
The Bronze Age civilizations of the Aegean, Levant, and Northern Africa were very powerful and advanced but also surprisingly fragile. Their agricultural output was plentiful, but only when managed carefully, it was not as efficient nor nearly as sustainable as agriculture in the Iron Age and the Middle Ages. And it was much closer to being marginal when not carefully managed. Trade too was heavily centralized through government, and trade was crucial for attaining basic materials for everyday commerce, including bronze (which required Copper and Tin, both of which needed to be imported to most places, often from great distances away). When catastrophes destabilized those governments it became a rapid positive-feedback loop into apocalyptic levels of destruction. Disrupted trade and commerce combined with food shortages meant huge groups of desperate people with nothing to lose and starvation looming. They overthrew governments to try to get at whatever resources they were hoarding, they attacked each other, they attacked their neighbors. Palaces were burned, entire cities were burned, and because those palaces and cities were the central nervous system for entire civilizations those civilizations fell back to shockingly crude levels of development.
People established new settlements, starting growing crops again, migrated to places that were less destroyed, and slowly started eking out livings as subsistence farmers. It took hundreds of years for society to recover to the same level of development in terms of trade, technology, sophistication, arts, etc. as the late Bronze Age. A big reason for the rise of Iron work in the subsequent age was not because it was superior (it took perhaps a Millennium for that to become true), but rather because it didn't require long distance trade and could be more easily recycled and repaired than Bronze.
Note that the Sea Peoples were merely the first wave of attacks in the collapse, there were multiple waves by other aggressors later. The collapse was essentially a period of ubiquitous widespread warfare lasting about a generation.