Like the domestication of the horse itself - we aren't sure. In fact, our primary evidence for the early date of equine domestication is horse skulls with teeth marks that indicate some kind of bit was being used - with a date of around 4000 BC. We know for sure bits were in use by 3000 BC.
The earliest bit was probably a bit of rope, but we aren't sure when somebody thought of putting it in the horse's mouth as opposed to around the nose and worked out this was generally more effective. And, of course, we don't know how long people were riding or driving horses before they thought of it. Until 1300 BC, bits were made of rope, born, horn or even wood. In 1300 BC, bronze bits came into use.
As a note, nickel was a favored metal for bits in the 19th and early 20th century, but was mostly replaced by stainless steel in the 1940s. (However, nickel bits do sometimes show up, and can be associated with problems such as allergic reactions).