The general rule is: double a single consonant letter following a single vowel letter with a short-vowel vowel sound; don't double anything else. (The doubled consonant is a cue that the vowel sound should remain short.)
So:
- cut has a short 'u' and a single 't': therefore cutter.
- program has a short 'a' and a single 'm': programmer.
- read has a long 'e' sound from 'ea': reader
- head has a short 'e' sound but it comes from a double-vowel 'ea', so header.
Of course, this being English, there will be exceptions.