"We have given our hearts away, a sordid boon!"
The sonnet is obviously saying that most of us, or many of us, including the speaker himself, presumably Wordsworth, have become so involved in earning and spending money that we have lost touch with all the beauty of nature surrounding us. He probably had to use the word "boon" for a practical purpose. He had to find a word that rhymed with "soon" and would rhyme with "moon" and "tune," because of the requirements of the type of sonnet he was composing.
What he means by "a sordid boon" is that we have made a very bad bargain. We have given our hearts away in exchange for money. This is indeed a bad or sordid bargain if we have done so. If we have lost our hearts in the bargain, either literally or figuratively, our lives are dark and empty. We are like the blind. Or worse than that: we are like the dead. We are surrounded by beauty and drama but miss almost all of it except for occasional "glimpses" when we are not thinking about practical, selfish, worldly matters. Our minds are filled with an endless stream of consciousness like that depicted by James Joyce in his novel Ulysses and by William Faulkner in his novel The Sound and the Fury.
To understand what Wordsworth means by a sordid boon, we must consider the first part of that same line. We have given our hearts away. That is a horrifying thought. What have we gotten in exchange? What is the boon? Where is the quid pro quo? There is nothing we could receive in exchange that would be worth a fraction of the value of what we have given away. And once we have made a bargain, it is almost impossible to undo it.