This poem alludes to two other sonnets: "Sonnet 106" in Sir Philip Sidney's Astrophil and Stella series, and Shakespeare's own "Sonnet 44," which appears directly before this poem in his collected Sonnets.
The opening line of "Sonnet 45" mentions "The other two, slight air and purging fire," without explaining what the original "two" are. (Though audiences familiar with the four classical elements can infer that the speaker means earth and water.) "Other" implies that earth and water have already been discussed, and, in fact, "Sonnet 44" describes the speaker's sorrow at being comprised "so much of" these heavier elements. In particular, the speaker wishes he were made of thought rather than flesh. His thoughts travel to be with his faraway lover at a moment's notice, while his flesh—made up of earth and water—is slow and remains behind. Still, according to "Sonnet 44," the one redeeming quality of these elements is their ability to express the pain of being apart, via "tears" that serve as "badges of [...] woe."
"Sonnet 44" presents the heavy elements as an obstacle to the speaker's communion with his love. Thus, the callback to "Sonnet 44" reinforces a stark contrast between the burdensome earth and water and the swift, vibrant air and fire. "Sonnet 44" is about the pain of "Injurious distance," so the allusion also encourages the audience to bear themes of absence and longing in mind as they continue into "Sonnet 45." Critics consider these two poems companion pieces, meant to be read together (though "Sonnet 44" can stand on its own).
In "Sonnet 45," the speaker's thoughts and desires—represented by the lighter elements, air and fire—travel back and forth between himself and his lover. He describes them as "present-absent," echoing the opening line of Sir Philip Sidney’s "Sonnet 106" in Astrophil and Stella:
O absent presence, Stella is not here;
Sidney's sequence of sonnets and songs is told from the perspective of Astrophil, who is enamored with Stella. Astrophil eventually learns that Stella is happily married, a fact that only heightens his desire. Stella begins to return Astrophil's affections, with the condition that their relationship remain chaste. But when Astrophil betrays Stella's terms—attempting to coerce her into sex and kissing her while she's asleep—their relationship falls apart.
"Sonnet 106" appears at the tail end of this sequence, when Astrophil’s hopes for romance are crushed for the last time. Stella had fallen ill, and Astrophil, reminiscing about her pink cheeks during their tender moments, had mistaken her paleness for a sign that her body was ready for new love. Now, in "Sonnet 106," Astrophil scorns his previous, delusional hope, realizing that Stella won't return to him. Instead, she remains an “absent presence” in his life.
The allusion to Sidney's poem likens the speaker of “Sonnet 45” to a man who's just lost all hope of being with his beloved. In doing so, it heightens the dramatic atmosphere of "Sonnet 45" and helps show how extreme its speaker’s emotions have become. The allusion probably isn't meant to invoke specific plot points of Astrophil and Stella, aside from the lovers' separation—though overlapping themes (e.g., love as illness) are interesting to note! Rather, the allusion evokes a general atmosphere of high passion and doomed romance to dramatize the intensity of the speaker's feelings. The echo of Stella's "absent presence" underlines the pain and longing that constantly loom over the speaker of "Sonnet 45."