"When love is an unerring light, /And joy its own security." Can somebody please explain these lines from "Ode to Duty"?
You have to consider these lines in the context of the entire poem: "Ode to Duty."
Wordsworth personifies duty as the "Stern Daughter of the Voice of God." Duty guides us, lights our way, keeps us from error and wrongdoing. He feels sorry for the people who don't know Duty. Then, in stanza three, where these lines appear, he says that the people who know Duty can sleep peacefully "When love is an unerring light,/ And joy its own security." Those who follow Duty need not worry or fear.
Wordsworth ends the poem with the lines "Oh, let my weakness have and end!/ Give unto me, made lowly wise,/ The spirit of self-sacrifice;/ The confidence of reason give./ And in the light of truth thy Bondman let me live!" That is, take away all my weaknesses and give me the confidence to live in the light of your truth.
What Wordsworth is telling us is that Duty may not seem pleasant and to some may be harsh, the only way to live a joyful and fear-free life is to humbly follow the unerring path of Duty.
These lines are both metaphors, first of all. A metaphor is a comparison in which something "is" something else.
"Unerring" means "without error or flaw," so Wordsworth is saying that love is a flawless light (perhaps love is pure and untainted and will always be so) and joy is in and of itself, security. Perhaps Wordsworth is saying when one feels joy, it evokes a sense of security. Also, if one relates the purity and flawlessness of love to joy, then the two go hand in hand, don't they? :-)