Mistress Hibbins was an actual historical figure, a woman convicted and hung of being a witch. Hawthorne includes her for two reasons. One, as the sister of the governor, she helps to demonstrate the hypocrisy of the society. Two, she presents a foil to Hester, allowing us to understand Hester better.
Hibbins could be the other side of Hester, the bad side. Hester could easily go over to that bad side. Having been alienated from the community, as Hibbins has been, she could become evil, angry, and a servant of the devil. All the things that Mistress Hibbins is. The town pushes Hester to the edge of town - Hibbins domain is the forest, so Hester is almost there. Hibbins actually tries to tempt Hester into that forest, so sign her name with the "Black Man."
Hibbins is offering Hester frienship, connection - Hester refuses. This character allows us to see how devout Hester is as a Christian. She will not, despite her rough times, turn to the dark side of society and herself.
I agree with the previous post. Hibbins definitely serves a purpose in terms of helping to develop Hester as a character. Both Hester and Hibbins have been alienated from the town; however, each woman responds differently to being an outcast. Hibbins essentially embraces it, becomes angry and nasty to people around her, and she is eventually accused of witchcraft and hanged. Hester, on the other hand, works hard to purify herself from her sin by enduring the town's public shaming.
Here, she said to herself had been the scene of her guilt, and here should be the scene of her earthly punishment; and so, perchance, the torture of her daily shame would at length purge her soul, and work out another purity than that which she had lost: more saintlike, because the result of martyrdom.
By occasionally showing readers Hibbins, Hawthorne is better able to show how wonderful Hester is at overcoming the burden of her guilt and public shame.
I would like to offer another possible reason for Hawthorne's inclusion of Hibbins. Hibbins is an actual historical figure that is being included in a work of fiction. By doing this, Hawthorne is able to ground his story a bit more in reality. Hibbins gives the story a firm time and place setting. She also provides readers with actual historical evidence that Hawthorne's story and portrayal of Puritan society is not purely fiction. He hasn't exactly built a story around real people, but he has woven real people through his story, which has the effect of further grounding the story.