By opening the play with these lines, Shakespeare establishes the mood and conveys the theme instantly. What used to be good will begin to be bad, and what seems to be bad will become good. This juxtaposition is one of the main themes of the play, that ambition and greed can lead to destruction.
The witches serve as a sort of chorus for the play. They establish Macbeth’s future as Thane of Cawdor and king. Before the witches arrive and talk about things being foul and fair, Macbeth is a hero. He has fought valiantly for the king and killed the traitors. He is no coward, and seems to be interested only in success in battle.
Then the witches arrive. They are about to turn Macbeth from fair to foul. Things will no longer be black and white. Everything will be mixed up. The witches’ presence continually spurs Macbeth on to more and more violence. They have told him he will be king. They are a self-fulfilling prophecy.
Before meeting the witches, Macbeth comments:
So foul and fair a day I have not seen. (Act 1, Scene 3, enotes etext p. 12)
He reiterates the witches earlier comments, which he did not hear, and brings continuity to the concept and ties the concept to Macbeth. Somehow, the day is both good and bad—as Macbeth is both good and bad at this point.
Banquo’s comments when he is suspicious of Macbeth also refer back to this line.
Thou hast it now: King, Cawdor, Glamis, all,
As the weird women promised, and I fear
Thou play'dst most foully for't: (Act 3, Scene 1, p. 40)
Banquo remembers what the weird sisters told them and what Macbeth said. His choice of the word “foully” to describe Macbeth’s killing Duncan has double meaning: Macbeth did not play fair to get the throne.
Malcolm also comments to Macduff that Macbeth is treacherous,
That which you are, my thoughts cannot transpose.
Angels are bright still, though the brightest fell.(25)
Though all things foul would wear the brows of grace,
Yet grace must still look so. (Act 4, Scene 3, p. 67)
These lines are hopeful. Malcolm believes that if he and Macduff take back the kingdom, things can be good again. He is right. They are able to take out Macbth, and Malcolm regains the kingdom. The evil is stamped out. Ambition led to destruction, but what's bad is good again.