Doctors can travel to third-world countries to provide medical help to sick people there. Lawyers can do pro-bono work to represent low-income clients in need of legal help. Engineers can build schools, solar power plants, or irrigation systems for people in foreign countries. But how can programmers help to make the world a better place?
Many times, you can help out in ways that have nothing to do with programming. For instance, you could collect books for a book drive, or tutor students in math or science after school.
If you can't donate time, you could try investing in a credit union or a socially responsible investment fund. These typically give interest just a fraction of a point lower than typical banks or mutual funds, while at the same time providing fair loans to people in need of capital. The best part is you can get all of your money back at the end! To find some funds in your area, you can google for "Socially responsible investing" or look at any of the Financial categories on http://www.greenpages.org .
This is the rationale behind the political aspect of the open source movement.
Programmers can put more tools and information on the WorldWideWeb.
Many economists believe that knowledge transfer is the most important form of foreign aid. For example, companies that directly invest (e.g., build and operate factories, and teach employees how to do things) have a far greater effect (dollar for dollar) than governments that pay to build infrastructure.
The value of information made available on the WorldWideWeb far exceeds the monetary foreign aid provided by governments in recent years.