In the sacred lontar it states that the Balinese must give to beggars. They are accepted members of society, but only if they are crippled, retarded, or have some other health problem. You're not obliged to give money to strong, healthy people.
The beggars you see in Kuta and Legian are usually mountain people from the Kintamani area. Traditionally they grow corn, potatoes, and salak, which they sell or barter in the rice-growing towns. However, many have turned to begging because they make a better living off dumb tourists. They put on a sad face and dress themselves and their small children in rags. Don't fall for it. The more you give, the less motivation healthy individuals and their children will have to earn an honest living.
Never give money to children as it creates an endless cycle of dependence and diminishes their self-worth. Encourage Balinese pride by saying "Tidak boleh!" ("You may not!") to begging children. Instead of money, offer a look through your binoculars, pens, notebooks, or color postcards (in Kuta or Legian or you'll be mobbed).
If an adult Balinese does a favor, a little uang rokok (literally, "cigarette money" or pocket change) may be appropriate. A small child who hikes all the way up Mount Batur before sunrise to sell cokes, or fetches coffee and a newspaper is not begging. A small gratuity is definitely in order.