The message that is delivered is the answer to the question "What do all women most desire?" Through the Wife of Bath's very long prologue and following story, the reader learns that her answer to that question is "To have power and control over their husbands and lovers."
Her prologue illustrates this concept because in it the Wife of Bath illustrates how she has had five husbands and tells the travelers exactly how she attempted to manipulate each husband into doing what she wanted. At times she used fear; other times she used her sexuality.
The Wife of Bath's tale follows a similar story arc. A knight is sent out on a quest to find out what women most desire. He comes back with the answer that an old hag tells him. Women want control over their man. The court accepts his answer and as payment the knight must forever be with the old hag. He's not happy about it, but the hag then gives him a choice: she can turn beautiful but be unfaithful or she can be faithful and loving but ugly. The knight tells her to pick which she would rather be, thus giving her exactly what she most desires -- the power to control her own decisions. So she turns beautiful AND faithful.