Edith Wharton's background was very much like the characters she depicted in the novel. She, like Newland Archer and May, came from old money. Like Newland, she felt pressured into a marriage that was approved by her family and with somewhat unhappy consequences. Unlike Newland who remained in his marriage, though, Edith Wharton divorced her husband.
Wharton actually wrote the novel for herself. She wrote it while she was working on a much more ambitious project. When the novel was published, she was quite shocked by its success. She expected it to have a limited audience, and was surprised by the number of readers who could relate to some of the choices that the main characters made.
While Wharton exposes the flaws of Old New York society, she also portrays some of its strengths as well. At the heart of the story are Ellen, May, and Newland. Each sacrifices with grace and honor his or her own personal happiness for what they consider the greater good. Ellen will not run off to marry Newland because she will not hurt her cousin May. Even though Newland did give up the "flower of his life," he makes the best of a passionless marriage and lives an honorable life, being a good public servant and a loving father. And May, who knew about her husband's passion for Ellen all along, gives Newland an out before they announce their engagement, but when he decides to go through with the marriage, she fights nobly to keep her family intact.
So, Wharton's purpose seems to expose the both the strengths and weaknesses of Old New York society at the turn of the century.
Considering that most of Edith Wharton's stories were written as historical fiction to reflect the situational dramas of her time, we can safely assume that she wrote The Age of Innocence under the same premise that she wrote The House of Mirth, which was to expose the New York "Victorian" society in the early 20th century.
Additionally, her purpose as an author was to let the audience peek into the lives of the nouveau riche of New York and compare them to the old, established dutch families who seemed to rule it.
In The Age of Innocence there are a lot of hypocritical standards, which basically rule society. When you cannot be a part of it by peerage, you could be a part of it by new money. Yet, old New York is ruled by names, and if you fail to comply with their rules, you are as good as dead. That is the basic problem in the story, and that is why Edith Wharton (just like she has done with so many of her stories) exposed that reality.