I can only answer for State Banquets hosted by the Queen [I am no good with information relating to Foreign Houses]; the guest list is always:
The Queen [hostess] and Prince Philip.
The Heir to the throne & spouse; i.e. Charles and Camilla
Other members of the British Royal Family, provided they are present in the country and available. Apart from 'officially working members' [Princess Royal, Dukes of Kent and Gloucester etc], Princess Michael of Kent and Princess Michael of Kent almost always attend. Several of the UK tabloid newspapers use as a guideline ' Do they have a Royal Title and if so they will attend'. This is in one sense not strictly true, because theoretically you don't have to be a titled member of the Royal Family to attend, but in practice this is how it works out so far as the BRF is concerned. Prince Andrew does not always attend - the reason for absence is not formally stated for anyone, but you can sometimes work it out: for example the obvious one is if he is abroad in his role as the UK's Special Trade Representative.
'Non-working' Spouses of the British Royal family such as the Princess Royal's husband almost always attend if they are about. [Obviously, if they are working elsewhere they won't be able to attend]. Sir Angus Ogilvy [husband of Princess Alexandra] used to attend when he was alive. 'Non Royals', such as the Viscount Linley, Zara Philips etc are [usually] not invited, even though they are further up the 'pecking order' in the line of sucession than some of those 'titled royals' who do attend.
Young non-working royals such as Princess Beatrice and Princess Eugenie do not attend, ditto Prince Harry and William. Lack of a Royal Role [in the case of B and E] and Age [William and Harry] has been the previously quoted explanation.
A good supply of Courtiers / Royal Household members etc who are scattered amongst the guests, in order to encourage conversation etc etc. You will therefore find the Queen's Ladies in Waiting, Private Secretary and Deputies, Equerries etc.
Prominent members of the Armed Forces.
The Prime Minister, Deputy Prime Minister and almost all Cabinet Ministers: obviously the Foreign Secretary and a goodly supply of important Civil Servants from the Foreign Office. Privy Counsellors. Members of the Opposition and sometimes representatives of the more minor oppoistion parties. Other ministers NOT in the Cabinet may be invited if there is a special 'link' to them and the visiting Head of State being honoured. For Example, if President Obama had been a Professional Footballer before becoming president, the guest list would be 'heavy' with sporting politicians etc.
Privy Counsellors.
Members of the Opposition [Labour Party] and sometimes representatives of the more minor Opposition parties. Scotland's First Minister, the Head of the Welsh Assembly. Sometimes prominent members of the Scottish Parliament and the Welsh Assembly.
Prominent members of the House of Lords who are not necessarily members of the Government or the Opposition. These can include prominent 'Cross-Benchers', i.e. Members of the House of Lords with no political affiliation.
Other MPs, either prominent 'backbenchers' [i.e. not ministers] or those MPs with some sort of 'Special Link' to the 'guest country'. [in this case, any politicians who are on special 'US/UK friendship-type Societies.
British Diplomats.
Prominent members of the nobility - but I have noticed over the years that the aristocracy per se seem to be less prominent than previously - unless of course the person in question is (for example) also a member of (say) the Diplomatic Corps or the Army (ie. in his or her own right....)
The Archbishop of Canterbury is always invited, also other religious dignitaries including those from outside the Church of England may be invited.
The Lord Mayor of the City of London. [Hugely important because of global business connections].
Boris Johnson, the Mayor of London
'Ordinary' Guests. In practice these will be prominent Citizens living in the UK, both British and the 'guest nation'. In the present case, this will include prominent American expats who make their home in London. From memory this may well include a former US ambassador who has kept a home here in London. Guests with charitable connections to the host nation may well be invited.
Sometimes these 'other guests' will not always be 'obvious choices'. For example, when I was working full time a few years ago, there was astonishment at the time when the Queen held a State Banquet for the Brazilian President, where one of the guests was......Jimmy Page, guitarist from Led Zeppelin. Now, (despite what some people might think on the basis of 'apparent friendships' between Rock Stars and Royalty), HM does not usually 'associate' with rock stars at ''State level''. There is a greater connection with Rock stars and the younger royalty, but again this is usually through a charitable connection [e.g. rock stars who turn out for the Prince's Trust etc: note that although Elton John and his partner were invited to the Royal Wedding, they were apparently not sufficiently 'friends' of William/ Catherine to 'rate' an invitation to the Reception(s)]. The mystery of Jimmy Page's Invitation was eventually solved when it emerged that he has a Brazilian wife and had been a very generous contributor back in Brazil to various charities.
Other important people prominent in UK public life, who may NOT attend each banquet - they tend to turn up on a 'rota' basis, altough in practice there is no actual 'rota'; it's more a case of: ''Sir XYJ hsan't been to a State Banquet for some time - let's add him to the guest list this time.'' I have seen the odd prominent broadsheet editor / tv presenter at a State Banquet in the past - and not just in a capacity as a reporter/ presenter etc.
The above people almost always attend with their spouse/ Civil Partner or very-long-standing partner. What the Americans call 'dates' are not invited: the Royal Command you get [i.e. the invitation] never says 'plus one'. This practice reflects the very great formality of State Banquets: it's the nearest occasion we have to the old 'Courts', if you like. [And you will be eating off solid gold plates etc etc with solid gold cutlery etc etc.....!!]
I've mainly dealt with the UK side of things above, but you can probably by now work out that the 'Guest' Nation will recieve invitations for the pominent members of the guest's entourage. Thus President Obama will find that his prominent accompanying aides [and their spouses] will receive invitations, together with the US Ambassador to the Court of St James [i.e the US Ambassador in London], Consular Staff, prominent Americans in London etc etc.
A couple of footnotes: Whilst I have said that people like Zara Philips do not attend, if there was some 'connection' between the 'non-attending royal' and the host nation, there is the chance that a non-royal could be present. For example, if the UK hosted a State Banquet for a nation whose head of state had been an Olympic competitor or a noted equestrian etc Zara might find herself with an invitation.
Second footnote: A State Banquet is often the only opportunity for 'Royal Watchers' to learn if a female member of the Royal Family has been given the Royal Family Order by the Queen: State Banquets are 'white tie' [or treated as such] and therefore 'decorations will be worn'. Traditionally, there is no formal announcemnet that the Queen has honoured a member of her family by making them a member of the Royal Family Order; thus, eagle-eyed 'Royal Watchers' keep their eyes peeled to see who is wearing a Royal Family Order and who has yet to be honoured.
Third Footnote: Will the Duke and Duchess of Cambridge be present? On the one hand, the couple is tending to 'keep a low profile', and William does have a very proper career in the RAF, but on the other hand, something tells me that they MIGHT attend: they are about to include a visit to the United States in their first Royal overseas tour...and also, there is a slight feeling that [sory, it is hard to express this] that William and Catherine 'can't lock themselves away for ever': I also noticed some of the broadsheet papers last week noting that if William and Catherine can 'associate with Hollywood Royalty', then perhaps they could let the Queen's own subjects see them peforming the odd Royal Engagement....
So will they be present at the State Banquet? Who can say.....
Hope some of this helps,
Alex