It was never explained in the animated series. But in the (unofficial) Avatar Wiki, we find this:
After the departure of the lion turtles, the acquisition of bending abilities became dependent on a large number of factors and complex variables; inheritance patterns are not well understood by the people of the World of Avatar. Though each nation is affiliated to a specific bending art, not all citizens from any nation, with the exception of the Air Nomads, are born with the ability to bend an element. In the case of mixed marriages, the children may be benders of either element, but never both if they are benders at all; for example, firebender Mako and earthbender Bolin are brothers with parents from the Fire Nation and the Earth Kingdom.
One important known factor in determining the likelihood of a person to inherit bending abilities is the genetic history of the family. It can be considered a recessive gene, since it is possible for a person to inherit bending skills even if they have two nonbending parents, as in the cases of Katara and Toph. Likewise, having one or two bending parents is no guarantee to inherit bending skills; Aang and Katara's eldest son, Bumi, and the swordmaster Piandao were both born nonbenders despite each having two bending parents.
People who have a greater genetic basis for bending are said to have more "talent", or inherent ability than those who have a weaker genetic basis; though genetics alone don't entirely account for the actual proficiency of a bender, as a person with little genetic basis can become a skilled bender through significantly hard work. On the other hand, it is possible for someone with a strong genetic basis to go about their entire life without ever developing a true ability in bending because of a poor spiritual upbringing or lack of fervor in practice. Due to these anomalies, the nature of bending acquisition fluctuates and has prevented the rise of a superior "bending social class" in the World of Avatar.
Spirituality is an important aspect of bending inheritance. It is for this reason that all Air Nomads, the most spiritual community in the World of Avatar, were airbenders. Another notable variable is the population size of the country: for example, the Earth Kingdom is the most populous nation but has the smallest percentage of benders relative to total population among the four nations. The Earth Kingdom is also the least spiritual nation. Generally, people can determine whether or not they are a bender before reaching puberty.
You can find some references in the wiki article itself.
IMO reincarnation plays a role - I like to think that all benders (pre-Korra season 3) are the original people who left the lion turtles' backs, reincarnated. That's could be why the nations with larger populations (especially the Earth Kingdom) have a smaller percentage of benders - the original benders would be a minority.