We take it for granted that the state is a sovereign entity, and I'm wondering when this paradigm was established. For instance, if I had an issue with the government today, I'd bring suit against he government itself, not just the Senator who wrote the law, or the congressperson who voted for it.
To further clarify (I'm just making something up here), if I the Sheriff of Rottingham wronged me, I'd bring this up with my king, and the king would see that the Sheriff was brought to justice, instead of having an issue with the county of Rottingham or the Kingdom of Robbingwoods.
I'm not sure, but I assume if there was an issue between two nations it would be more of a conflict of the leaders and their interests(Elizabeth I and Philip II?), as opposed to the nations themselves (Britain and Spain). It would definitely be before WWII, as in WWI Germany and her allies themselves was held accountable and to make reparations. I also feel its much earlier, since the preservation of the Union was cause for deployment and conscription during the American Civil War.
Another example is when laws or regulations in the USA are said to be legitimate when they have a "compelling state interest." How and when did a state begin to have an interest in affairs for its own sake? When did people first start to bring suit against the state as an actor?
I was going to write a reply, then decided this question is too big for one person to answer, but I decided to go ahead anyway with the hopes that you can advance and perhaps cast the context in a more specific way.
First of all, the Wikipedia page on state formation is actually not a bad starting point. One takeaway from that is, "what do you mean by state?" Meaning, are you talking about the identification of agents of state or the formation of the body that becomes the state.
One way that your question about Rottingham and Robbingwoods can be addressed is by saying (drumroll.....) "it depends." By the time of Philip II's conflict against Elizabeth I, the notion of "Spain" was already quite strong. You can go back and ask, "But what is 'Spain'?" and the answer is that in that time it described all of the Iberian peninsula and three generations prior, Isabella and Ferdinand coaxed Portugal into claiming that it could call itself "Iberia" or "Hispania" or more familiarly "Spain". You can then ask, "When did people of Spain start to call themselves Spanish instead of Castilian or Aragonese or what have you?" The answer is, it was a convenient shorthand when they were abroad, in particular when they were in the Americas. So, there was external factors that led to the formation of a common identity. Further, the Santa Hermandad and Spanish Inquisition have done a lot of work to enforce royal powers and the religious orthodoxy of Spain.
And you can contrast that with England, where there was still conflict between Protestants (and also, which denomination?) and Catholics. So one had to be more precise in addressing "English Catholics" versus "English Protestants".
If you are to jump ahead to WW2, then you have to address the question of how modern nation-states came to be. There are many theories around this. There is the military revolution theory whereby conflict became expensive and democratized at the same time, what with firearms making knights and thus aspects of feudalism obsolete. This set the threshold of war much higher, ergo states had to be developed. Michael Roberts and Geoffrey Parker are proponents of this theory.
Jan Glete focused instead on the "contract" between royalty, nobility, and the peasants, whereby a new institution arose. Marxist theory focuses on the failure of feudalism to sustain itself, thus the royals had to centralize in order to maintain their power.
So, in summary it will be great if you make your question more specific.
That is a complex question that would require a pretty long answer.
The short answer is that the state became stronger and stronger during the 16th and 17th centuries until the 30 Years War basically established states as entities in some ways.
That isn't an accurate statement exactly, but it gives you a feel for it. It was after the Thirty Years War that states started to become entities unto themselves and some were more separate from their rulers than others were. The United Provinces really have a state very separate from the Stadtholder throughout the 17th century with the Stadtholder's power within the state waxing and waning depending on circumstances and the individual.
If you want to read about how some of this took place in one country, England, I'd recommend Jonathan Scott's "England's Troubles."
The movement towards a state was not linear either, there was a lot of back and forth with various monarchy-like entities.
If you want to read about the theory of a lot of these things you can read people like Locke, Hobbes and Harrington.