"Retribution" is defined as being indicating an act in return for something done. In a sense, Hester's elaborate embroidery decoration could be interpreted as an indication of her ultimate refusal to view her actions as sin. She chose to highlight and emphasize the letter by creating a work of art that was completely beyond the bounds of appropriate appearance for the society in which she lived.
it had all the effect of a last and fitting decoration to the apparel which she wore..but greatly beyond what was allowed by the sumptuary regulations of the colony.
In another sense, the embroidery could be interpreted as Hester's effort to call attention to the letter as a warning to others. The continuing presence of that reminder permitted no one in the community, and certainly not Hester herself, to ever put the incident that led to the letter's presence behind them.
In either sense, the embroidery could be seen as an act of retribution by Hester.