Dimmesdale's revealing his chest in the third scaffold scene is Hawthorne's way of suggesting that the minister has a mark on his chest similar to Hester's A that shows his guilt. By showing his chest to the public, Dimmesdale is revealing the truth about himself: he is an adulterer. Remember that Chillingworth saw something on the minister's chest while Dimmesdale slept, something that delighted Chillingworth so much that he actually danced with glee? We know that the minister has scourged his back with a whip in an attempt to punish himself for his sin. Perhaps he has also marked his chest in some way, maybe even carving a letter "A" there. Hawthorne was famous for his use of ambiguity; he suggested more options than he ultimately gave proof for, always leaving open the possibility that these options may have occurred. The public reacts when they see the minister's chest so apparently some kind of mark is there. As readers, of course, we want to know exactly what that mark is, but crafty Hawthorne keeps us in the dark, making us imagine all kinds of possibilities. All of them, however, revolve around the minister's decision to mark himself because of his guilt and his inability until that point to confess his sin.
The revelation of his scarlet letter is Dimmesdale's verification of his sin as well as a figurative opening of his soul to the townspeople. So long tortured by the guilt of the concealment of his adultery, Dimmesdale, in his final act, exposes everything. His dying triumph is this revelation, for he has at last conquered his weakness, the weakness that made him earlier think that he was serving the Lord:
...retaining...a zeal for God's glory and man's welfare, they shrink from displaying themselves...because, thenceforward, no good can be achieved by them....
Since this decisive act, a victory over himself as well as the evil Chillingworth, comes in Dimmesdale's dying moments, there is no reason for the minister not to confess. In fact, he realizes that he must confess all if he is to save his soul. The revelation of Dimmesdale's chest is, thus, a climactic action that underscores Hawthorne's theme:
Be true! Be true! Be true. Show freely to the world, if not your worst, yet some trait whereby the worst may be inferred!
Dimmesdale revealed his chest because he knew he was dying and didn't want to die with that big secret. he was feeling bad about it and wanted to get it off his chest.