Conventions for driving on one side of the road go back to at least the Roman Empire:
In late 1998, the remains of a Roman quarry was discovered at Blunsdon
Ridge, near Swindon, England. It is one of the largest and
best-preserved Roman quarries known. Ruts in the road leading to this
quarry are much deeper on one side of the road than on the other. If
it can be assumed that the side of the road with deeper ruts was the
side used by loaded carts leaving the quarry, while the side with
shallow ruts indicates empty carts arriving, then we can conclude that
at this particular location, at least, the Romans drove on the left. (source)
There are various theories about why one side of the road was preferred to the other, often based on the handedness of riders or the side of the body on which travelers wore swords:
In the Middle Ages you kept to the left for the simple reason that you
never knew who you'd meet on the road in those days. You wanted to
make sure that a stranger passed on the right so you could go for your
sword in case he proved unfriendly.
This custom was given official sanction in 1300 AD, when Pope Boniface
VIII invented the modern science of traffic control by declaring that
pilgrims headed to Rome should keep left. (source)
More here.