Throughout the course of Avatar: The Last Airbender, Aang mastered the four elements in order to restore balance to the world. However, he never quite left his roots as an airbender, relying on this element more than any other throughout the series. Along the way, he developed an aversion to the use of fire that made it his most rarely employed element.
Of the two remaining elements, water and earth, it's not immediately clear which one Aang grew most proficient in. In comparing in depth his use of both elements, however, it's possible to determine which one the Avatar mastered more.
The answer might only seem obvious to an Avatar fan who exclusively compared Aang's first-day training in each element. When Katara first instructs Aang in waterbending, he takes to it like... well, a duck to water. The similarities between the fluid element and his native airbending proved great enough that Aang quickly learned many of the techniques Katara showed him, and even managed to exceed her expectations in how quickly he would learn. Conversely, during his first earthbending lesson with Toph in "Bitter Work," it's clear that the episode earns its title from Aang's struggle with the confrontational nature of the sturdier element.
However, these initial lessons can be deceiving in just how adept Aang would become with each element. By the time the Gaang leaves the North Pole, Pakku mentions that Katara's disciplined hard work at waterbending paid off so much that she exceeded Aang's own talents for the element, to the point where she could become his instructor. Even once he clearly had the hang of the element, he rarely employed it, and even then, he most often worked in tandem with Katara or else used relatively simple maneuvers like water whips or creating a tide.
By comparison, earthbending became far more useful to Aang. While water was so similar to the element he was more comfortable with that he seldom had a use for it, Aang very often found that the unparalleled power and force of earthbending made a valuable weapon and defense. His progress advanced far more quickly with the element, going from struggling with it in "Bitter Work" to weaving it into his duel with Azula in "The Drill" -- just four episodes later. By the end of that same season, he utilized earthbending in storming the Earth King's palace and in his battle in the Crystal Catacombs not just with proficiency, but with impressive displays of power that marked a master.
Aang could send out huge waves of earth to topple his enemies, armor himself partially or fully to enhance his defense, or ride on a rolling mound to create an unstoppable charge. By the time of his duel with Ozai at the end of the series, he tore apart columns of stone to hurl massive boulders and even made a defense of stone around him so strong that it withstood repeated blasts from Ozai's comet-enhanced fire blasts. Meanwhile, his usage of waterbending never really advanced far beyond throwing increasingly large amounts of water. In fact, he rarely ventured into even rudimentary techniques like ice-bending. Comparison of his usage of the two elements favors earthbending by virtually every metric.
It is notable that when Aang mentioned he needed more time to master firebending at the series' end, Toph tacked on that his earthbending "could still use some work, too," while Katara remained silent about Aang's waterbending. Still, given just how much more utility Aang found in earthbending and the power with which he wielded it, the statement seems more a remark on Toph's strict standards compared to Katara than any real comparison of Aang's bending skills.
The truth of the matter is that Aang's earthbending was fantastic -- certainly worth counting among the best of anyone in the original series. It may simply be a matter of one proving more useful than the other, but at the end of the day, it seems that all of Aang's bitter work paid off after all.