Magneto didn't "reprogram" the sentinels in X-Men: Days of Future Past, he merely wove metal in throughout their structure so he could control them. It was mechanical control, not software control.
However, we do know that he contributed to one notable computer, at least in the film universe:
He helped build Cerebro
Magneto was instrumental in creating Cerebro, as confirmed by Xavier, and we see in X2 that he is very skilled in quickly re-programming it as well, even decades later. Now, the reprogramming was very physical in nature (rearranging panels within the Cerebro sphere), but you don't get to work on a machine like that without having some understanding of how computers work.
Who's got a cool helmet, a dashing cape, and at least a passing understanding of software design? This guy!
That being said, it's unlikely that Magneto can write software purely with his mind. From a real-world perspective, digital encryption is simply too complex for him to be able to process: even if he had the pen in his hand, he wouldn't know the language. In-universe, the two times we've seen him work with computers (the Sentinels and Cerebro), his "reprogramming" has come in the form of rearranging physical metals to create a desired effect.
From this we can deduce that, in order to influence a computer, Magneto must attempt a physical alteration, and not a software-based interface.
Now, he could probably wipe a computer pretty effectively, especially older magnetic-based computers and hard drives, but it's unlikely that he could write anything onto one.