It is mostly due to the differing social attitudes of the day, but the legal position was also different in 1936. The Wikipedia page is pretty clear about the social attitudes, but I'll try to explain the legal issues here.
In 1936 the Church of England opposed remarriage after divorce. Furthermore, at that time, the Church of England considered adultery to be the only grounds for divorce. In English law, grounds for divorce were governed by the Matrimonial Causes Act (1857). In brief, men could sue for divorce on the grounds of adultery by their spouses, while women had to prove additional offences (such as incest, sodomy, cruelty etc.) had been committed.
Wallis Simpson's first divorce (granted in the United States) had been on the grounds of "emotional incompatibility", and so was not recognised by the Church of England. In the eyes of the church, therefore, her second marriage was bigamous. There was also the very real possibility that had her divorce been challenged in an English court, it might not have been recognised under English law.
In 1937, a year after the Abdication Crisis, Parliament passed the Matrimonial Causes Act (1937), which expanded the grounds for divorce, but which would still probably not allowed Wallis Simpson's first divorce to be recognised had it been challenged in an English Court.
The law required that the monarch must be in communion with the Church of England (the monarch was head or "Supreme Governor" of the Church of England). A bigamous marriage would create a split with the Church as precipitate a constitutional crisis.
Since 2002, the Church of England has allowed divorcees to marry. Furthermore, both Prince Charles and Camilla Parker Bowles had divorced under English Law (which had become much more liberal since the Matrimonial Causes Act (1973)), so there could be no legal challenge to their union.
Charles and Camilla were therefore able to marry without any problem in 2005.