Outsourcing trivial authorless work
The fact that to a seasoned programmer the work is easy doesn't have anything to do with it. As you describe it, this is work that's required for the publication. Without it, you don't have a paper. With it, you do. Therefore the programmer contributed significantly (critically) to the paper, and therefore the programmer should be an author.
The fact that it's quick and easy for a programmer simply means that programmers have spent significant time and effort learning skills that you don't have. If you consider the work trivial, then go out and learn the skills yourself, and do the work yourself. If that's too much work, then put an appropriate value on that work and offer authorship.
An example in my field is histopathology. I can take tissue slides to an expert who will look at them for five minutes and provide an interpretation. That expert becomes a co-author, not because of their five minutes of work but because of the decades of experience behind it.
Collaborators shouldn't need to run a bloody gauntlet and engage in hand-to-hand combat to become co-authors. If they provide a skill that contributes significantly to the paper, that should be enough.
Seasoned's programmer's rate would probably be $100-$1000 per day. This, assuming that your estimation is correct (dangerous assumption) means you are asking for a volunteer to provide you with $500-$5000 of free labor(assuming that the work takes 5 days).
I also find it strange that you mention time for a seasoned's programmer, but want to hire an undergrad - the difference in the time required to finish the job might differ much. And no work is "Trivial" if it requires "few days" of expert's work.
Undergrad's work might also be of lower quality because of his lack of experience - what if the program is faulty and returns wrong results? How would you know that?
Ultimately it comes down to how you arrange it - you might find someone willing to do it for free. I suggest considering potential gains (is undergrad contributing $2000 in his time not enough to become a co-author?) and threats ( what if the work takes much longer? what if the program has bugs? what if the undergrad can't do it? ).
Would it be ethically wrong to recruit an undergrad for a few days volunteer work without pay
"Ethically wrong"? Some answers say it isn't (though I disagree)
But that is the wrong question to ask
However, I feel [that] to get some backing on the theory, I need... computer data.
- You've worked on a problem for two years.
- You're going to trust "a couple days" free work from a random undergrad to prove it?
If you don't know enough to code it yourself, how do you know the code is right?
In other words (and this isn't meant as harsh or flippant) if you can't tell me how you will be able to tell the difference between these two outcomes:
- A person taking your assignment and coding something which produces the answer you expect
- A person writing a program which will prove or disprove your theory
...then you don't need the code, do you?
If it turns out you think #2 is correct, but later someone proves that #1 is what really happened... that's bad.
This is only for time reasons as I am not familiar with tools required. Everything will be given as cook book to the interested programmer.
This information was added after I wrote my answer. I answered with the assumption that OP was getting an undergrad to do the code because s/he lacked the knowledge.