What is the origin of the Waltham surname?
Surnames were originally only used by aristocratic, landowning families who needed to be able to easily prove their rights to land, through their family relationships. Eventually, in medieval times, surnames began to became more widely adopted, their usage eventually spreading through all levels of society.
Before hereditary surnames became the norm, while people may have had a surname, they did not pass them on to their children. They were just a way to distinguish people of the same forename in a community, so they would take the form, for example, of John Little (who would probably be tall), William of York or Edward the Baker.
These names would only be used by the bearer and not adopted by their children. From the 1300s the custom of passing a surname from father to child began to take root outside the aristocracy, and so it is likely that the first people that used the hereditary surname ‘Waltham’ lived at some point during the 1300s.
The surname Waltham is a locational surname, which means it describes the place the first bearer came from. So, the originally the surname would have been something along the lines of ‘John de Waltham’, meaning ‘John of Waltham’ (at that time records were kept in French or Latin). In time the ‘de’ was lost and the hereditary surname just became ‘Waltham’.
The name could have been taken at various times by different, unrelated families, as anyone from the settlement of Waltham could have adopted it, so it might not be the case that all the people with the surname Waltham today are related.

I have analysed the location of the surname over time. In the 1840s, before the industrial revolution led to greater movements of people in the British Isles as they increasingly left rural areas to work in towns, Lincolnshire was the Waltham hotspot.
It appears from looking at wills and parish records, and counting how many times a person called Waltham is mentioned in records over the centuries and where they lived, and mapping where those people lived, that the Lincolnshire Walthams came from the settlement of that name near Grimsby.
In the 1500s people with the surname lived mostly in a ring to the south and north of that area, both in Lincolnshire and in Yorkshire. The first recorded bearers of the name in the areas around Grimsby are John de Waltham, a bishop of Salisbury in circa 1375 who was from Waltham near Grimsby (depicted on a brass plate in Salisbury Cathedral), and also Johannes de Waltham, who lived in Skirbeck in 1381 (the port area of Boston, Lincolnshire).

The name popped up further afield, however. There are many other places called Waltham in and around England, such as in Leicestershire, Hampshire and Essex, which also gave rise to people using the surname Waltham. However, given the distributions of the surname by the time of the 1841 census, it is likely that most people alive today with the surname Waltham descend from people who came from Lincolnshire or Yorkshire and adopted the name because they came from Waltham near Grimsby. In fact, based on my research, I think it is likely that most people that have the surname Waltham today are descended from a large family, born to Richard Waltham and Frances Marfleet, who lived in the Boston area in the early 1700s.
Over the time the descendants of the first Walthams from the Grimsby area moved further south into Lincolnshire, perhaps travelling by water along the coast or rivers. They became increasingly numerous in and around the Boston and Spalding areas, where my forebear, Richard Waltham, married in 1705.

Only a Y-DNA study could tell if the present bearers of the name all have the same ancestor or whether there are several unrelated lines. There could be more than one family – other lines may be descended from those who adopted the surname in Yorkshire rather than Lincolnshire.
The name also had a population around London, though London has always been a magnet for migrants and most English surnames are recorded there at some time or other. There was also a Waltham family in the West Country, who are responsible for the Waltham coat of arms. From my research into this line, it seems they were not related to the Lincolnshire Walthams and that none of their living descendants survive with the surname Waltham today.