I've heard/read various conflicting reports concerning the legitimacy of William I's claim to England and am looking for some clarification.
I’m not a specialist in this research, but I've got some understanding of the events that outline the current theory.
It is important to point out that the answer to this question is difficult due to considerations of both geography, and the notion of "legitimacy" at the time, and since then. I also know there are several events between 1050 - 1066 that would be dispositive in answering this question, but are heavily disputed by historians.
William I was the only son of Robert I, Duke of Normandy. This title was over the Duchy of Normandy, in present day France. In fact, the Duke of Normandy remained a significant title in French nobility for many centuries after the Norman Kings proclaimed title and squabbled over present day Britain, with a diverse history of actual and threatened secession to boot. The Duchy of Normandy was often given to close relatives of the reigning monarch of France, so it evolved into a French region, as it obviously remains today.
So, William gained title following the death of his father Robert I, who died from illness on his return home from Jerusalem. Much of Robert I’s anecdotal history comes from the Gesta Normannorum Ducum, a chronicle begun by a monk named William of Jumièges around 1060.
Robert I was son of Richard II, and became Duke when his elder brother Richard III died. This could be one of the the first temporal areas where historians question the legitimacy of William’s line. Some historians hold that Robert probably had involvement in his brother’s death, thus leading to an earlier question of William's legitimately inherited title.
Not to mention the fact that some would maintain that William’s mother Herleva, not being of noble birth or having ever actually been married to William’s father, would straight away be a suggestion of his illegitimacy. I think it’s important to remember that “legitimacy of nobility” as a construct is very much based on biblical standards of familial structure, so because of his being born to unmarried parents - traditionally some would have questioned his rightful title as Duke following the death of his father, Robert I.
But, let’s say for the sake of entertaining this question further, that at the moment of his father's death he was the legitimate Duke of Normandy.
Frank Barlow is an English historian with very credible scholarship, and I’ve actually only skimmed through his The Norman Conquest and Beyond, but it seems to be pretty authoritative. All of the following I credit to his research and writings.
In 1051, King Edward of England (Edward the Confessor) had supposedly promised William I the throne, choosing him as his successor in the royal line.
I’m skipping some incredible history here for the sake of simplicity, but in 1066 Edward died. This is one of the most contentious bits of history, but supposedly Edward had promised Harold Godwinson the title of King on his death bed, thus throwing his prior declaration that William I would succeed him into the trash. This is largely disputed, as is Edward’s naming William I as his successor in 1051, so weighing that scale of probability is how some people come to the conclusion of his legitimate claim, and that of his justification in invading England.
So, William I was pretty pissed off when he found out that Harold Godwinson had become King Harold II of England, on the grounds that Edward had originally promised him the throne, instead.
William I sailed on England and more or less began the greatly studied Norman Conquest of England. When he landed, he marched something like 250 miles to where King Harold II had set up his army, and this clash became known as the now very famous Battle of Hastings. During the battle, or I suppose it could have been afterward, Harold II, and his brothers, were all killed. I know it was considered very wasteful to kill nobles on the battlefield during these times because of the opportunity for ransom. (I think I remember someone in this sub wonderfully outlining this combat procedure at some point, I can try to find this later). But, given the adverse perception of who was rightful king, William I probably made a judgement call (before, during, or after the battle) that Harold II and his bros simply had to die; insulating himself from future contest from this man that could or could not have been the rightful king.
In a nutshell, this is when William I initially secured his hold on England. He marched on London for a couple months, "securing" neighboring areas (I think he burned a lot of it).
This march ended when he crossed the Thames, enticing most of the remaining noble resistance to take a knee to him.
He was then famously crowned as the King of England in Westminster Abbey on Christmas morning, that same year of 1066, about 2 months after he won the Battle of Hastings.
So - did he have a legitimate claim on England? I suppose as William the Conqueror - sure he did. He conquered England, as the bastard son of the Duke of Normandy, as descendant of Danish Vikings, and killed his rival in battle. As William I, announced as to expect succession by King Edward, maybe. Whether Edward definitely announced this tree of succession, or whether he handed title to Harold II on his deathbed, we’ll probably never know with 100% certainty.
But again, it’s important to remember that being the child of unmarried parents, son to a "commoner" mother, a descendant of Danish Vikings, and ultimately a French man based on contemporary geography - makes it reasonable to dispute his legitimate claim on the English throne. Personally, I think it’s appropriate to consider him as the initial architect of an almost 1,000 year old English monarchy (traceable to this day) via the Norman Conquest, as he took the crown by conquest as an invader, as William the Conqueror.
Nobility by familial structure and endowment was very convoluted during these times (or always has been, perhaps?) and often not so simple as "eldest son - to - eldest son - to eldest son" and, when there was no eldest son to inherit a title, semi-modern procedures of "eldest brother" or "husband of eldest daughter" and so on were seldom concrete, and often disputed (with great violence).
Lineage of nobility, and conflict therein, in France and England becomes much more accurate and detailed following his taking the throne. Not to say there hasn't been outstanding research into the lines preceding his birth, and long before. However, his was a very early time in the post-Roman spectrum of traceable European familial history.
EDIT: "250 miles" is incorrect, more like 30km - thank you /u/Mr_Marram. I confused Harold II's maneuvering with William I's movements post-landing.
How would you define legitimacy?