Both poems are alike in being narrated by a young chimney sweep and discussing the life a chimney sweep leads. Both show the misery of this life.
However, in "The Chimney Sweeper" poem in Songs of Innocence, the chimney sweep still has hope and faith in adults and their institutions. He knows, at least in his dreams, that he is enslaved, but he can also dream of an "Angel" setting him free. At the end of the poem, he holds out the innocent hope that:
if all do their duty, they need not fear harm.
The poignance of the poem comes from the slippage between the narrator's innocent faith and the reader's unhappy recognition that this faith is misplaced.
In "The Chimney Sweeper" poem in Songs of Experience, the young narrator now knows that no "angel" will save him. In this poem, the young narrator condemns institutionalized religion. He says that the parents who have abandoned him:
are both gone up to the church to pray.
In other words, rather than do anything concrete for him, they are trying to feel better about themselves through religion. Later this chimney sweep says that because he has been taught to appear happy on the outside, dancing and singing, it is easy for the adults with power to look the other way and pretend everything is fine:
They think they have done me no injury,
And are gone to praise God and his Priest and King,
Who make up a heaven of our misery.
The child now knows that institutions of religion and monarchy (a hierarchical society) come up with words that tells lies—"make up a heaven"—to rationalize away the "misery" of the powerless so they don't have to deal with it. This child no longer believes he will be free of harm.