When poetry is embedded in narrative literature we ought to consider two things: (1) what the poem means on its own terms in conjunction with the present setting of the story (2) what, if any, significance the poem carries for the broader storyline.
First, Hannah’s song signifies her turn from sorrow to joy as barrenness gives way to birth. More than that, it ties theology to life as we consider how the outcome of Hannah’s circumstances reveal God’s work and his ways.
The Lord makes poor and rich / He brings low, He also exalts. (2:7)
The song’s theme is God’s reversing of human fortune. Weak are made strong, hungry are fed, and the godly are preserved while the wicked are shattered, the full beg for bread, and the mighty are rendered impotent. In fact, this sovereign upending of the “natural” order is an outworking of God’s holiness (i.e. no one is like Him in this respect; 2:2). Hannah has come to see firsthand that the Lord favors His godly ones who are characteristically despised by the world (1:6-7). And as the Lord will later say through Isaiah, “I act and who can reverse it?”
My horn is exalted in the Lord (2:1) . . . [He] will exalt the horn of His anointed (2:10)
The poem is framed by the repetition of the Lord exalting a *horn (a structural feature known as an inclusio). The movement within this framework starts with a specific act (vv1-3) to a generalizing pattern (vv4-7) back to a specific act (vv8-10). It’s as if Hannah is saying:
{Specific} “Look at what the Lord has done for me.
{General} But isn’t this just like the Lord? He’s always doing this kind of work.
{Specific}And I trust that he’ll do this for His king, too.”
Similar examples of this pattern can be found in other poetic passages (see Psa 34) and it’s worth considering how these examples might shape the content of our worship, particularly in prayer.
Second, Hannah’s song encompasses more than the first two chapters as it establishes a recurring theme/pattern in 1Samuel. With an increasing degree of drama, we move from one rivalry to another: Peninah–Hannah / Eli & Sons–Samuel / Saul–David. In each case, the “established” character is supplanted by a character of lesser status by a sovereign work of the Lord. Even the great king, David himself, is a virtual nobody until the Lord raises him up to sit on the throne.
*The literal image of the horn is of an animal horn. Generally speaking, an animal’s horn signified its strength and so became a metaphor for power or status in a social context. (Dictionary of Biblical Imagery, 400)