A simile indicating that something or someone is not quite right, or, later, homosexual.
A bob is slang term for a shilling, part of British currency before decimalisation. A shilling was worth twelve old pence, and there were twenty of them to a pound. Of course, as Abe Simpson would say, money was worth a lot more in those days...
Bent originally meant dodgy, rather than its later meaning of gay. Hence, you get the term bent copper, denoting a corrupt police officer. As shillings came in ones, twos and tens, a nine-bob note would be a forgery, and therefore very bent indeed.
The American equivalent is 'queer as a three dollar bill'.