Duffer first appeared in print in the mid C19.The Oxford English Dictionary says it is perhaps from 'dowfart', an archaic Scots word from the early C18, a noun meaning 'a dull or stupid person' later used as an adjective meaning 'dull or stupid'. Dowfart is 'dowf' with 'art' ( a Scots variant of the English noun- ending 'ard'). Dowf meant 'a spiritless, stupid or gloomy person', or the same adjectivally, and is found in Late Middle English. It persists in northern England and in Scots dialect. Dowf seems to come from Old Norse 'daufr' meaning deaf.
As 'duffer' first appears in Victorian times it may be that it is a deliberate modification of the vulgar sounding 'dowfart'

.That said, 'duffer' has a sound of English public school slang to it. I associate it with old public school types. It's the kind of word you'd expect in Billy Bunter stories or Tom Brown's Schooldays: "I say, you fellows, the chap is a complete duffer!".Public School slang often uses the -er ending e.g 'rugby football' becomes 'rugger'.It could simply be that the boys took 'duff' from 'dowf' or from 'duff'(see below) and added the -er. Duffer is not a current popular term. However the colloquial adjective 'duff' meaning 'useless' and applied to objects or ideas, not people, is current and universal in British. The OED says that 'duff' in this sense dates from the late C19 but is unable to say whether that word is from 'dowf' or 'duffer' or the late C18 'duff' meaning something worthless or counterfeit.
In England we would readily use 'duffer' for a bad golfer but not much, if at all, for a bad chess-player.
Golf has been played in Scotland since at least the time of James IV whose court accounts refer to golf equipment and who lifted a ban on the game in 1502( it had been banned as a recreation because it occupied time better used in archery practice) In England, King James I (and VI) was certainly a player.It was not widely played in Britain until the second half of the C19.England's earliest golf club dates from 1864 though there are records of the game being played at Blackheath, near London, for a prize in the C18.