7 Some trust in chariots and some in horses,
but we trust in the name of the Lord our God.
Psalm 20:7 (NIV)

King David wrote this verse..one that I learned at Vacation Bible School as a child. Taken out of context, it reminds us that the Name of the Lord is powerful and trust-worthy. It is better to trust in the Lord than to place our trust in even the might of an army. Military might, political power, wealth, popularity, social influence– all are fickle. God is Sovereign and will do what He says He will do.
In context, David is not just recounting a principle; he is speaking from the experience of being God’s anointed King. In the verse just before this, David says:
6 Now this I know:
The Lord gives victory to his anointed.
He answers him from his heavenly sanctuary
with the victorious power of his right hand.
See full text of Psalm 20 here
David knew God’s saving power– he had experienced protection, blessing, and victory from the hand of his Creator. He had also known exile, hardship, and danger.

It is interesting to note that King David did not come up with the image of horses and chariots– God had already spoken to the people of Israel, warning them NOT to put their trust in such things. David was proclaiming his adherence to God’s command several hundred years before:

Appointing a King
14 When you have come into the land which the Lord your God gives you and possess it and dwell there and then say, “I will set a king over me just like all the nations that are around me,” 15 you must set a king over you whom the Lord your God will choose. You must select a king over you who is from among your brothers. You may not select a foreigner over you who is not your countryman. 16 What is more, he shall not accumulate horses for himself or cause the people to return to Egypt in order that he accumulate horses, for as the Lord has said to you, “You must not go back that way ever again.” 17 He shall not acquire many wives for himself, lest his heart turn away; nor shall he acquire for himself excess silver and gold.
18 It must be, when he sits on the throne of his kingdom, that he shall write a copy of this law for himself on a scroll before the priests, the Levites. 19 It must be with him, and he must read it all the days of his life so that he may learn to fear the Lord his God, and carefully observe all the words of this law and these statutes, and do them, 20 that his heart will not be lifted up above his brothers and so that he may not turn aside from the commandment, to the right or to the left, to the end, so that he may prolong his days in his kingdom, he and his children, in the midst of Israel.
Deuteronomy 17:14-20 (ESV)

David did NOT adhere to all of God’s commands for a king. He had many wives, and family troubles plagued his house for generations to come. Tragically, his son Solomon, for all his wisdom in other areas, failed in his kingship because he failed to put his full trust in God. He accumulated wives, horses, chariots, and wealth, but he lost the opportunity to establish his father’s house and his family’s dynasty by trusting in the very blessings of wealth and wisdom that God had given to him.
God blessed both King David and King Solomon with peace and prosperity. Neither one followed God absolutely, but David understood something his son never fully grasped. God’s blessings are abundant; they are rich and glorious. God showers blessings upon both the just and the unjust. They are not always a mark of God’s favor– frequently, they become a stumbling block and a substitute for the worship that belongs to God alone. Solomon began his reign by trusting the God of his father, King David. But in the end, he put his trust in his wealth and honor, and turned his back on God.

25 Solomon had four thousand stalls for horses and chariots and twelve thousand horses, and he put them in designated cities and with him in Jerusalem. 26 He ruled over all the kings from the River to the land of the Philistines and to the border of Egypt. 27 So the king made silver in Jerusalem as abundant as stones and cedar as plentiful as sycamore trees in the lowlands of the Shephelah. 28 The horses of Solomon were imported from Egypt and from all other lands.
2 Chronicles 9:25-28 (ESV)
In fact, he did exactly what God had warned against during the days of Moses– importing horses from Egypt. Without context, it seems like such an ordinary thing–kings accumulate might and power, and they import the best this world has to offer. What’s wrong with that? Solomon’s own father had the answer; the answer was written into the laws of Moses(the very ones Solomon was commanded to keep with him at all times!), but Solomon turned away and crossed the line between gratitude for God’s blessings to placing his trust and identity in those very blessings.

Some (people) trust in chariots and some in horses;
Some trust in their jobs or their homes;
Some trust in governments or politics;
Some trust in their bank accounts or their popularity–
Where is my trust today?