I can't vouch for it, but this has been given as an explanation :-
The origin is military. "Spot on" has a short entry in Eric Partridge, "A Dictionary of Catch Phrases American and British": "Right on the spot, orig. dead centre on target: RAF: WW2 and after. Adopted by civilians in UK, in Aus., in S. Africa. Cf 'bang on!' and 'right on!'"
Muffet's response above seems spot on (!) as regards the military origin, but the phrase was certainly around before the RAF lingo of World War II, as it was recorded as far back as 1920.
Muffet Blimey, you get all over don't you - i've just sent you a reply to a question of mine you answered in Quizzes and Puzzles. Anyway thanks for that explanation. I used the phrase only last night to my grandson and he asked me what it meant. I told him but then wondered about the origin. Thanks again oh wise one!
Thanks, Janbuck. Glad to be of help. It's amazing what we learn from trying to answer someone else's questions. Mind you, from Quizmonster's contribution, I may have been wrong. At least you may have satisfied your grandson. My grandson's most frequent comment is 'you need your glasses'.