Bending is an ability based on both genetics and spirituality. With that being said, a person with a vast amount of benders in their family line is more likely to be a bender, than a person with very little. However, this is not always the case as seen with Katara. Although her parents were both nonbenders, she attained the ability to waterbend, while her brother did not. Spirituality is also a major factor in determining the bending abilities of a person. As we see with the Air Nomads, their high level of spirituality has it made so that their entire populace consists of airbenders.