Usage of bob for shilling dates back to the late 1700s. Origin is not known for sure.
Possibilities include a connection with the church or bell-ringing since 'bob' meant a set of changes rung on the bells. This would be consistent with one of the possible origins and associations of the root of the word Shilling, (from Proto-Germanic 'skell' meaning to sound or ring).
There is possibly an association with plumb-bob, being another symbolic piece of metal, made of lead and used to mark a vertical position in certain trades, notably masons.
Brewer's 1870 Dictionary of Phrase and Fable states that 'bob' could be derived from 'Bawbee', which was 16-19th century slang for a half-penny, in turn derived from: French 'bas billon', meaning debased copper money (coins were commonly cut to make change).
Brewer also references the Laird of Sillabawby, a 16th century mintmaster, as a possible origin. Also perhaps a connection with a plumb-bob, made of lead and used to mark a vertical position in certain trades, notably masons.