A friend recently drew my attention to an article in the Daily Mail which claims that the Prince of Wales is on standby to deliver the Speech from the Throne if the Queen is unable to attend the State Opening of Parliament on May 10. However, the issue is a bit more complicated than the Mail suggests.
The current practice is for Lords Commissioners to act on the Sovereign’s behalf if they are unable to attend Parliament in person. This is most commonly seen at prorogation and the royal approbation of the Speaker-elect of the Commons, but Lords Commissioners have delivered the Speech from the Throne from time to time (the most recent occasion was November 12, 1963). As with prorogation, the speech is actually read by the senior commissioner who is a member of the government.
Formerly, the Prince of Wales was one of the Lords Commissioners, but he stopped being included after the House of Lords Act 1999 stripped him of his seat in the Upper House. However, he could be reinstated since the choice of Commissioner is ultimately a matter for the Queen. The fact that he is no longer a member of the House of Lords wouldn’t matter–Lord Chancellors have signified the Queen’s approbation of the Commons Speaker even when they have been MPs.
Prince Charles could also theoretically deliver the Speech from the Throne as a Counsellor of State, though this has never happened before. For example, Lords Commissioners opened Parliament on November 6, 1951 even though George VI had appointed Counsellors of State on September 27.
Although Counsellors typically act in pairs, this requirement could be satisfied by having another Counsellor sit next to Prince Charles while he reads the speech. Rodney Brazier has even argued that the Sovereign could allow a single Counsellor to act, though this possibility remains theoretical at this point. One potential drawback to the appointment of Counsellors of State is that, by law, the Duke of York would nominally be one of the Counsellors even if he played no part in the ceremony. This would almost certainly give rise to controversy, so it might be preferable to go a different route.
The final possibility is that Prince Charles could deliver the Speech on his own as Regent, but as things stand, that seems highly unlikely. A regency is meant for cases of long-term incapacity; it’s not an ad hoc arrangement.
Personally, I think reinstating Prince Charles as a Lord Commissioner would be the most prudent option if the Queen can’t deliver the Speech in person. It would represent a relatively minor change to the established practice, and Prince Andrew wouldn’t be part of the equation at all. But with any luck, it won’t be necessary, and Her Majesty will attend as usual.
UPDATE (4/30/2022): I’ve added some discussion of the possibility that Prince Charles could give the Speech as a Counsellor of State.
UPDATE (5/9/2022): Buckingham Palace has announced that Prince Charles and the Duke of Cambridge will open Parliament as Counsellors of State.
 Traditionally, that would have been the Lord Chancellor, though it would likely be the Leader of the House of Lords nowadays.
 As noted above, a single Lord Commissioner reads the Sovereign’s speech even though their Commission formally entrusts that duty to any three or more of them. The mere presence of the other Commissioners is sufficient to satisfy that requirement.
 Section 6(3) of the Regency Act 1937 states that “[a]ny functions delegated under this section shall be exercised jointly by the Counsellors of State, or by such number of them as may be specified in the Letters Patent, and subject to such conditions, if any, as may be therein prescribed” (emphasis added). For more information, see Rodney Brazier, “Royal Incapacity and Constitutional Continuity: The Regent and Counsellors of State,” in The Cambridge Law Journal, Vol. 64, No. 2 (Jul., 2005), 379.
 Under section 6(2) of the 1937 Act, the first four adults in line for the throne are the only ones who can act as Counsellors of State. While the Queen can excuse someone from acting if they will not be present in the UK, she can’t substitute anyone else. Consequently, the Duke of Sussex could be omitted, but not the Duke of York.