Giving money to charity is good. But if you worked less, you'd have more time to volunteer. I'd say that's more valuable.
I think current best estimates are that the most efficient charitable donations you can make save about one life per $2000 donated. If you're a decently but not extravagantly paid US software developer (I'm not, but the money is in the right ballpark) then maybe your salary is $100k/year; let's say you donate 5% of that before tax, or $5k/year; that's 2.5 lives saved per year. Most things you could do by volunteering full time probably do less good than that.
(Of course "lives saved" is an unsatisfactory metric; something like QALYs would be better. But the lives-saved figure is the one I happen to remember.)
Being a developer is a very valuable skill. Presumably, working for eight hours as a developer can pay for a number of volunteering efforts, so it's strictly more valuable.
If a charitable organization needed some software written, volunteering to write it would certainly be helpful, but this still requires you to be a domain expert in two things, rather than one.
Unless you mean "valuable" in the sense of "makes you feel more fuzzy," in which case you are killing people and I advise you to stop.
I don't think this situation is all that unusual. Charitable giving that's a fixed fraction of income is common practice in many religions (which have a whole lot of members) and among the "effective altruism" community (which is small but I bet it's overrepresented among HN types), and is a natural enough thing to do that I bet lots of other people do it.
(Ideally I wouldn't need to say these things explicitly, but I will anyway: Of course working harder is not always a good idea; as I said above, it's very much possible to work harder and merely make yourself tired and therefore less effective. And of course working harder, whether it makes you more effective or less, is no guarantee of getting paid more; plenty of employers are quite unresponsive to their employees' commitment and productivity. If anything I've said above looks as if it's denying those things then I expressed myself badly and I apologize.)