What are the main characters' motivations in The Impotance of being Earnest?
That's an interesting question, in that the motivations of everyone in this play are what push the plot forward. Not every play is like that; many have external events providing the main push for the action. But in this play, while there are silly coincidences and events which do move the plot along, the motivations of everyone are so clearly the point of the play that the events seem less important.
Jack Worthing wants more than one thing; he wants to go to town and be a gad-about, and generally get up to no good, but also to preserve his reputation and be a good example for his young ward Cecily. So, because he wants to have it both ways, he invents his fictitious brother Earnest to cover up his indiscretions.
Jack also wants to marry Gwendolyn Fairfax. Gwendolyn wants to marry Jack. Lady Bracknell, Gwendolyn's mother does not want Gwendolyn to marry Jack because he is "unsuitable". Lady Bracknell's motivations are to protect her daughter and to uphold convention.
Cecily wants to marry Algernon. Without getting too much into the complications of the play, Algernon wants to marry Cecily, but when he meets Cecily and falls in love with her he is posing as the (fictitious) brother of Jack, Earnest. You can imagine the hijinks which ensue, but the motivations of both Algernon and Cecily are to marry each other. Algernon has a secondary motivation which results in his fictitious friend Bunbury. He has created this imaginary friend so that he can get out of social obligations, especially avoiding his aunt Lady Bracknell.
The Reverend Chasuble wants to marry Miss Prism. Miss Prism wants to marry the Reverend Chasuble. There are some complications because Miss Prism has a slightly scandalous past (involving Lady Bracknell), but Miss Prism's and Rev. Chasuble's desires are essentially simple.
As you can see, Lady Bracknell is, essentially, the fly in the ointment for everyone. When her desires are resolved everyone else's are, too. Wilde plotted this comedy perfectly, with everyone's wants dependent on someone else's. When the snags are removed, everything comes out right in the end.