Stone walls do not a prison make, Nor iron bars a cage; Minds innocent and quiet take That for an hermitage;
Huh. The poem's final stanza begins differently from the other three. There is no "When" here.
Instead, the speaker claims that prisons aren't made of "stone walls" and "iron bars."
In fact, "minds innocent and quiet" might even imagine those structures as a "hermitage"—a secluded cottage-like home.
The emphasis on "minds innocent and quiet" suggests that somebody who is untroubled ("quiet") and truly innocent will able to use their mental power ("minds") to interpret a bad situation (like prison) in a better light.
The sentence structure of the first two lines is a little quirky to aid the rhyme scheme. In normal conversation you might say, "stone walls do not make a prison."
In the second line, too, you should pretend that the word "make" is included so that the sentence reads "nor [do] iron bars [make] a cage."
If I have freedom in my love, And in my soul am free
In these two lines, the speaker offers the first part of a conditional sentence ("If x, then y").
He says that if he has "freedom" in his love, and is free in his soul, then… well, we don't know what then, at least not yet.
"Freedom in my love" is a bizarre phrase (though it kind of sounds like the title for a new pop single). It likely means something like, "If my powerful feelings—my love—remains unconfined or untouched by this dirty prison and the chains that bind me."
The phrase "in my soul am free" should be read as if said "and [if] in my soul [I] am free."
Being free in one's soul means realizing that the soul—a powerful, spiritual, inner being—cannot be imprisoned by anything (like prisons, "stone walls," "iron bars," and such).
Angels alone, that soar above, Enjoy such liberty.
In the poem's final lines, we have an answer to our "If" clause. The speaker says that if he has freedom in his love and is free in his soul, he is like the "angels… that soar above."
In other words, once one realizes that the soul, and love, cannot be imprisoned by anything—that they are free—he becomes like an angel, a heavenly being with more freedom than just about everything else in existence.
Again, the syntax is a little tricky here, so here's how you should put these last lines together: "If I have freedom in my love, and if I am free in my soul, then the only other beings that enjoy the same liberty that I do are the angels that soar above us."
Note that the poem's final line is an echo of the phrase "know no such liberty" that occurs in the previous three stanzas.
This change in the refrain suggests that the speaker has reached a new understanding, or is a different person than he was at the start.