The role of the witches in William Shakespeare's Macbeth is three-fold. First, the witches part in the play is included given Shakespeare's desire to please King James. King James' curiosity regarding the supernatural led Shakespeare to include a supernatural (or three) elements in the play. Second, the characterization of the witches is also included in order to parallel the characterization of Macbeth. Third, the inclusion of the witches support the tone of the play.
The parallel of the witches to Macbeth is included in order to show Macbeth as an evil character. Led by his ambition, Macbeth is willing to do anything to possess and keep the throne. First murdering Duncan, Macbeth continues to spill more and more blood upon the land. Essentially, the relationship between Macbeth and the witches illuminate the idea of the paradox, which resonates throughout the play. The famous line, "foul is fair, and fair is foul," resonates time and time again over the course of the play. Proving that not all things are as they seem, the witches prove to be far less wicked and evil than Macbeth (shown to be quite good in the opening).
Lastly, the inclusion of the witches illuminate the dark and ominous tone of the play. Given the witches occupy the opening scene of the play, they set the tone for the remainder of the action. From this scene out, much of the action is both dark (the multiple murders and insanity) and ominous (the inclusion of the witches and the apparitions).