religionthink.com says that, although debate continues on the details of the hypothesis, almost all scholars agree that Psalm 29’s background is Baal worship, as portrayed in the tablets from Ugarit. There is undoubtedly good reason for this, but there may be other good reasons to alter that hypothesis somewhat.
First of all, the psalm is obviously a hymn to a storm god, and Baal was certainly a storm god. The repeated references to "The voice of the LORD" are references to thunder, but also to lightning. If I do a substitution (replacing words in the KJV Psalm 29):
3: thunder is upon the waters: the God of glory thundereth: the LORD is upon many waters.
4: The thunder is powerful; the thunder [of Baal] is full of majesty.
In verse 5, the reference includes the destructive power of the lightning that comes with the voice of the LORD:
5: The lightning breaketh the cedars; yea, the LORD breaketh the cedars of Lebanon.
The sound is so great as to shake the wilderness (v 8) and to cause deer to calve prematurely (v 9). Verse 10 associates the storm god with floods.
An apologetic interpretation of the Psalm could say that it simply portrays the voice of God as more powerful that the forces of nature, but this is not well supported in the text.
That Psalm 29 is based on a Ugaritic hymn is a hypothesis because there is no smoking gun. There is no ancient Ugaritic hymn that so closely resembles Psalm 29 that we can say, "This is the one." Nevertheless, religionthink.com cites H.L. Ginsberg, who in 1935 proposed that Psalm 29 was originally a Phoenician hymn which had found its way into the Psalter. The reference to Lebanon and Sirion in verse 6, and to Kadesh in verse 8, could be evidence to support a Phoenician origin.
How could a hymn to the storm god have become such a part of Hebrew religion that it comes down to us as a psalm attributed to David? The tradition of the Israelites as arriving from Egypt and conquering Canaan implies that there should be some emnity between the Hebrew people and the remnant Canaanite people to the north. J. W. Rogerson says in, 'Anthropology and the Old Testament', published in The World of Ancient Israel page 27, by the late 1970s a different consensus was emerging, particularly in America, according to which the Israelites had been peasant farmers in Canaan who withdrew or revolted from the influence of the city states and formed a new society with a tribal structure. F. S. Frick agrees, saying in 'Israel as a tribal society' (ibid) that the ‘immigration’ [conquest] model has been largely abandoned. This new understanding of the origins of the Israelite nation means that the people inherited their culture and religion from their Canaanite forebears. Biblical references to Baal need no longer be seen as sporadic episodes, with no lasting impact, of adopting foreign beliefs, but as deep-seated worship of the same gods as the Ugarits.
Spronk ('Beatific Afterlife in Ancient Israel and in the Ancient Near East', page 83) says it is usually taken for granted that religion represents the religion of the inhabitants of Canaan before of Israel as a nation and before the rise of Yahwism and that it been closely related to the Israelite folk religion. Canaanite traditions survived for a long time in the folk religion of Israel and were thus able to be influential as late as the second century BCE.
Baal had been a god of the Canaanites as much as he had been a god of the Phoenicians. With the recognition that the Israelites were actually descendants of the southern Canaanites and that they still, at least initially, worshipped the gods of their forebears alongside Yahweh, we can now see why Psalm 29 contains a vestige of Baal worship. The underlying hymn may have been specifically Phoenician, but could also reflect the common origin and affinity of the Israelites and Phoenicians. To have been attributed to King David and included in the Psalter, it was more than a disreputable foreign import; it was a deep-seated part of Jewish culture and religion.