As a student, how much time should I spend helping other students with research?
You forget one consideration: do you enjoy using that skill? To take your own example, I enjoy programming, and even though I might not learn or get anything technical from it, I enjoy solving someone's else problem with some lines of code :) Of course, one should be careful of the time spent and the reward you can get from it, but doing something you enjoy is very different than doing something you can, but don't particularly enjoy doing.

For instance, I can probably install a server and manage a website (with a CMS) for someone, but I don't enjoy it, so I would be very explicit about the benefit (I do that for you if you do that for me). But I could do some cool coding on my free time. 

On a completely different aspect, it also depends if you intend to stay in academia: it's a very small world, and the person you're doing a favor to today might be the one sitting on your tenure committee in 20 years (if you work in the same department and all stay in academia, it's quite likely that your paths will cross again at some point in the future).