I think that in most cases, taxpayer dollars are better spent here. For one reason, there is no way to control how the money is spent in other countries. The countries that need it the most have the most corrupt governments, and it is least likely that the money will get to those who need it. Currently, there are many projects from which our economy would greatly benefit. That money could be used better here, and we would have more control over where it went.
I would argue that it is not. To see why, I will look at the example of US aid to Pakistan.
Pakistan is a country that is strategically important to the US. It is a Muslim country that has been relatively friendly to the US. The US gives Pakistan a great deal of aid, partly as a way to keep the country friendly to us. However, it does not seem to work.
Pakistanis in general seem to be relatively unfriendly to the US. The current issue over the American "diplomat" now being held in Pakistan for murder shows this. So does the unwillingness of Pakistan to support American efforts to try to fight Al Qaeda in Pakistan's tribal areas.
This is the case even though the US has given huge amounts of aid to the country. We have given military aid as well as humanitarian aid (such as aid after the earthquake in 2005 as well as aid after the floods last year).
If military aid cannot buy us a friendly military and humanitarian aid cannot make us look good in the eyes of the Pakistani people, then what good is the aid doing?