Dramatically, the play's opening with the witches is important for at least two reasons. The first is a practical one: Shakespeare has to get the attention of the groundlings, those attending the performance who are standing in the pit around the stage. These people paid the cheapest price for their tickets, so they stood for the entire performance. Before the play begins, people are milling about, talking, and some are selling food. The playwright must grab their attention to quiet this group so that everyone in the theater can hear the actors. The Elizabethans believed in the existence of witches; these in this play are particularly ugly witches so their appearance on the stage would definitely grab the audience's attention.
Secondly, the witches' comment, "Fair is foul, and foul is fair," sets up one of the most important themes of the play: appearances can be deceptive. The witches, furthermore, are evil; they would appear via the trap door in the floor of the stage, indicating their origin in the Underworld and their collaboration with the devil. King James had written a book about witches, too, so there was intense interest in them. The appearance of the three witches would be riveting to the audience, and their remarks in the opening scene prepare the audience for the deception that will appear throughout the play.