A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 18:1"The servant of the LORD," which in the Hebrew precedes "David," is a significant part of the title (and not a mere epithet of David), denoting the inspired character of the song, as the production of one entrusted with the execution of God's will. He was not favored by God because he served Him, but served Him because selected and appointed by God in His sovereign mercy. After a general expression of praise and confidence in God for the future, David gives a sublimely poetical description of God's deliverance, which he characterizes as an illustration of God's justice to the innocent and His righteous government. His own prowess and success are celebrated as the results of divine aid, and, confident of its continuance, he closes in terms of triumphant praise. 2Sa. 22:1-51 is a copy of this Psalm, with a few unimportant variations recorded there as a part of the history, and repeated here as part of a collection designed for permanent use. (Psa. 18:1-50)
I will love thee--with most tender affection.
psa 18:2The various terms used describe God as an object of the most implicit and reliable trust.
rock--literally, "a cleft rock," for concealment.
strength--a firm, immovable rock.
horn of my salvation--The horn, as the means of attack or defense of some of the strongest animals, is a frequent emblem of power or strength efficiently exercised (compare Deu 33:17; Luk 1:69).
tower--literally, "high place," beyond reach of danger.
psa 18:3to be praised--for past favors, and worthy of confidence.
psa 18:4sorrows--literally, "bands as of a net" (Psa 116:3).
psa 18:5death--and hell (compare Psa 16:10) are personified as man's great enemies (compare Rev 20:13-14).
prevented--encountered me, crossed my path, and endangered my safety. He does not mean he was in their power.
psa 18:6He relates his methods to procure relief when distressed, and his success.
temple--(Compare Psa 11:4).
psa 18:7God's coming described in figures drawn from His appearance on Sinai (compare Deu 32:22).
psa 18:8smoke out . . . his nostrils--bitter in His wrath (compare Psa 74:1).
by it--that is, the fire (Exo 19:18).
psa 18:9darkness--or, a dense cloud (Exo 19:16; Deu 5:22).
psa 18:10cherub--angelic agents (compare Gen 3:24), the figures of which were placed over the ark (Sa1 4:4), representing God's dwelling; used here to enhance the majesty of the divine advent. Angels and winds may represent all rational and irrational agencies of God's providence (compare Psa 104:3-4).
did fly--Rapidity of motion adds to the grandeur of the scene.
psa 18:11dark waters--or, clouds heavy with vapor.
psa 18:12Out of this obscurity, which impresses the beholder with awe and dread, He reveals Himself by sudden light and the means of His terrible wrath (Jos 10:11; Psa 78:47).
psa 18:13The storm breaks forth--thunder follows lightning, and hail with repeated lightning, as often seen, like balls or coals of fire, succeed (Exo 9:23).
psa 18:14The fiery brightness of lightning, in shape like burning arrows rapidly shot through the air, well represents the most terrible part of an awful storm. Before the terrors of such a scene the enemies are confounded and overthrown in dismay.
psa 18:15The tempest of the air is attended by appropriate results on earth. The language, though not expressive of any special physical changes, represents the utter subversion of the order of nature. Before such a God none can stand.
psa 18:16from above--As seated on a throne, directing these terrible scenes, God--
sent--His hand (Psa 144:7), reached down to His humble worshipper, and delivered him.
many waters--calamities (Job 30:14; Psa 124:4-5).
psa 18:18prevented-- (Psa 18:3).
psa 18:19a large place--denotes safety or relief, as contrasted with the straits of distress (Psa 4:1). All his deliverance is ascribed to God, and this sublime poetical representation is given to inspire the pious with confidence and the wicked with dread.
psa 18:20The statements of innocence, righteousness, &c., refer, doubtless, to his personal and official conduct and his purposes, during all the trials to which he was subjected in Saul's persecutions and Absalom's rebellions, as well as the various wars in which he had been engaged as the head and defender of God's Church and people.
psa 18:23upright before him--In my relation to God I have been perfect as to all parts of His law. The perfection does not relate to degree.
mine iniquity--perhaps the thought of his heart to kill Saul (Sa1 24:6). That David does not allude to all his conduct, in all relations, is evident from Psa 51:1, &c.
psa 18:25God renders to men according to their deeds in a penal, not vindictive, sense (Lev 26:23-24).
merciful--or, "kind" (Psa 4:3).
psa 18:26froward--contrary to.
psa 18:27the afflicted people--that is, the humbly pious.
high looks--pride (Psa 101:5; Psa 131:1).
psa 18:28To give one light is to make prosperous (Job 18:5-6; Job 21:17).
thou--is emphatic, as if to say, I can fully confide in Thee for help.
psa 18:29And this on past experience in his military life, set forth by these figures.
psa 18:30God's perfection is the source of his own, which has resulted from his trust on the one hand, and God's promised help on the other.
tried--"as metals are tried by fire and proved genuine" (Psa 12:6). Shield (Psa 3:3). Girding was essential to free motion on account of the looseness of Oriental dresses; hence it is an expressive figure for describing the gift of strength.
psa 18:33God's help farther described. He gives swiftness to pursue or elude his enemies (Hab 3:19), strength, protection, and a firm footing.
psa 18:35thy gentleness--as applied to God--condescension--or that which He gives, in the sense of humility (compare Pro 22:4).
psa 18:36enlarged my steps--made ample room (compare Pro 4:12).
psa 18:37In actual conflict, with God's aid, the defeat of his enemies is certain. A present and continued success is expressed.
psa 18:39that rose up against me--literally, "insurgents" (Psa 3:1; Psa 44:5).
psa 18:40given me the necks--literally, "backs of the necks"; made them retreat (Exo 23:27; Jos 7:8).
psa 18:42This conquest was complete.
psa 18:43Not only does He conquer civil foes, but foreigners, who are driven from their places of refuge.
psa 18:44submit, &c.--(compare Margin)--that is, show a forced subjection.
psa 18:46The Lord liveth--contrasts Him with idols (Co1 8:4).
psa 18:47avengeth me--His cause is espoused by God as His own.
psa 18:48liftest me up--to safety and honors.
psa 18:49Paul (Rom 15:9) quotes from this doxology to show that under the Old Testament economy, others than the Jews were regarded as subjects of that spiritual government of which David was head, and in which character his deliverances and victories were typical of the more illustrious triumphs of David's greater Son. The language of Psa 18:50 justifies this view in its distinct allusion to the great promise (compare Sa2 7:12). In all David's successes he saw the pledges of a fulfilment of that promise, and he mourned in all his adversities, not only in view of his personal suffering, but because he saw in them evidences of danger to the great interests which were committed to his keeping. It is in these aspects of his character that we are led properly to appreciate the importance attached to his sorrows and sufferings, his joys and successes.