‘Tom, Dick and Harry’ was coined in 17th century England. Like many expressions that include people’s names Tom, Dick and Harry weren’t real people. Tommy Atkins was another example. The choice of names certainly came about because Thomas, Richard and Henry, which are the ‘proper’ versions of Tom, Dick and Harry, were very commonplace names in England in 1600s.
The earliest known use of Tom, Dick and Harry in print is in the work of the English theologian John Owen, who used the expression in 1657.
The phrase didn’t spring from nowhere though. Prior to Tom, Dick and Harry there was Tom, Dick and Francis. Shakespeare used this term to refer to a group of drinking partner loggerheads (by which he meant blockheads) in Henry IV, Part 1, 1597:
I am sworn brother to a leash of drawers [drinkers], and can call them all by their Christian names, as Tom, Dick, and Francis.
It may be that Tom, Dick and Harry was already in use by that time and that Shakespeare chose to amend it with Francis as Harry was the name used for the king in Henry IV.
Although Tom, Dick and Harry were English the phrase was in common enough use in 1941 for it to have been used as the title of a Ginger Rogers movie.
The French have their own variant in ‘Pierre, Paul ou Jacques’ and the Germans have ‘Hans, Peter and Fritz’, although these came about more recently.