In the 1700s freight haulers in France started using multiple horse teams to move large loads by road. The carts did not contain a seat, so French teamsters arbitrarily decided to sit on the left inside horse to ensure that a driver could see the wheels of oncoming carts.
France was an active participant in the U.S. war of independence, and their conventions became equally embedded within America's emerging culture. As a result, when moving heavy loads in the States, American teamsters began to follow French conventions, and drove their wagons and carts on the right side of the road.
When Napoleon marched through Europe (and nearly everywhere else), he bound his French cultural conventions within the various countries he conquered. Interestingly, if you look at where he operated throughout the early 1800s, you can see his influence on today's driving habits.
Prior to WWI and the emergent "horseless carriage," vehicles were primarily converted from horse-drawn wagons and carts to gasoline-powered vehicles. As the car became more prominent, driving habits were carried forward as well. As a result, during WWI, there were some issues between American and English truck drivers over which side they were supposed to be driving on when moving ambulances to and from the front, and when traversing muddy or unmarked roads.
About a quarter of all of the countries of the world still drive on the left, and of these, most are former outposts, or colonies historically part of the British Empire. These range from Anguilla to Zimbabwe.