Public perception may have played a role, and as has been pointed out elsewhere, the Church Of England changed its stance on divorce in 2002.
But in addition, the law had changed during that time.
Note: in England and Wales, there are only two types of marriage. A religious ceremony (performed exclusively by the Church of England edit - until C19th, when Catholics, Quakers, and Jews were also given permission to perform them) and a Civil marriage (a secular ceremony performed by the State).
From the UK Parliament summary of the issues with Charles and Camilla:
Lord Chancellor, Lord Falconer of Thoroton, made the following written ministerial statement on 23 February 2005
Civil marriages were introduced in England by the Marriage Act 1836. Section 45 said that the Act:
“… shall not extend to the marriage of any of the Royal Family”.
...
But the provisions on civil marriage in the 1836 Act were repealed by the Marriage Act 1949
However...
the 1949 Act says: "Nothing in this Act shall affect any law or custom relating to the marriage of members of the Royal Family."
So in 1949, a civil ceremony was still illegal for Royalty, and the Church of England would have denied a marriage ceremony if one partner was divorced.
In 1964, the position for civil marriages was further reinforced by the Home Office:
A civil marriage before the registrar, and marriage according to the rites of any church other than the Church of England, are not possible [for royalty]
This state of affairs led Princes Margaret to abandon plans for her wedding. From her statement at that time:
I would like it to be known that I have decided not to marry Group Captain Peter Townsend. I have been aware that, subject to my renouncing my rights of succession, it might have been possible for me to contract a civil marriage. But, mindful of the Church’s teaching that Christian marriage is indissoluble, and conscious of my duty to the Commonwealth, I have resolved to put these considerations before any others.
A very sad event for all concerned.
But in 1988, Human Rights legislation was passed. It applies to all existing legislation. It stated, among other things, that people couldn't be discriminated against - including Royalty. If everyone else has a right, then they have it too. It was updated in 2000.
I realise that this is now falling within the 20 year rule, but I hope that an exception can be made because otherwise I would have to omit the final few events.
If there were any doubt, [Lord Falconer stated], the Human Rights Act of 2000 gave any couple, Royal or commoner, the right to a civil ceremony "without discrimination".
Despite eleven objections to the wedding of Charles and Camilla being registered, all were dismissed after the authorities examined them.
The Registrar General found:
a reading of the 1949 Act which prevented The Prince of Wales and Mrs Parker Bowles from contracting a civil marriage would interfere with their rights under the European Convention on Human Rights ('the Convention'); and section 3 of the Human Rights Act 1998...
Therefore, when Edward wanted to marry, it was not possible for him to do so and to remain King. The law changed, and allowed Charles to marry and remain in line to the throne.
One interesting (but unrelated) side-note is that throughout all the period I discussed, Charles would have been specifically forbidden, by law, from marrying a Catholic. No other religion: just Catholics.
While that did not play a factor in Edward VIII's marriage or Margaret's situation, it would have done if their prospective partners had been Catholic.
Charles' previous marriage had already produced two heirs. Given Camilla's age, it was extremely unlikely that the marriage was going to produce a future monarch. In addition, word was put out that Camilla would not style herself Queen. Taken together, these allayed many of the concerns about the marriage.
There is a body of opinion that Charles and Camilla are not actually married. The marriage acts which introduced civil marriage contain provisions specifically excluding them from applying to members of the Royal family (S79.5 of both Marriage Acts 1849 and 1955). Lord Falconer's controversial opinion that the marriage was legal relied on the Human Rights Act.