Hope, on the other hand, is referred to as a helmet because, as a helmet is on the head, so the head of the moral virtues is the end, and hope is concerned with this end. Hence he states And take unto you the helmet of salvation.
Finally, the third function of weapons is for attack. It is not enough to simply defend one's self, it is also necessary to assault the enemy. Physically, this is done with a material sword; it is done spiritually through the word of God which is the sword of the Holy Spirit. On this account he affirms and take up the sword of the Spirit, which is the word of God. "F...or the word of God is living and effectual and more piercing than any two-edged sword and reaching unto the division of the soul and the spirit" (Heb. 4:12). Preaching is called the sword of the Spirit because it will not penetrate to the spirit unless it is disposed by the Holy Spirit. "For it is not you who speak, but the Spirit of your Father that speaks in you" (Mt. 10:20).
Therefore, we possess weapons to defend ourselves against carnal adversaries, namely, gluttony and sensuality, through temperance: Stand therefore, having your loins girt about with truth. By the arms of justice, which make us refrain from what is unlawful, we can conquer also earthly greed: and having on the breastplate of justice. This is aided by purity of heart or poverty which withdraw us even from things which are lawful: and your feet shod with the preparation of the gospel of peace. Moreover, we have weapons by which we are guarded from error, the armour of faith: in all things taking the shield of faith; and also protected from the enemies of the human race: wherewith, meaning the shield of faith, you may be able to extinguish all the fiery darts of the most wicked one. We likewise possess armour by which we are strengthened in spiritual blessings, the armour of hope: and take unto you the helmet of salvation. A helmet rests on the head, and so does hope in its end. Now the head of the moral virtues is the very end with which hope is concerned. Thus, to take up the helmet of salvation is nothing less than to have hope in the ultimate end. Finally, we have weapons to assault the demons themselves: the sword of the Spirit, which is the word of God. This happens frequently during sermons when the word of God, penetrating into the hearts of sinners, thrusts out the chaos of sins and demons.
Source: Commentary on Ephesians