The main function of a prologue tells some earlier story and connects it to the main story. Similarly, it is serves as a means to introduce characters of a story and throws light on their roles. In its modern sense, a prologue acts as a separate entity and is not considered part of the current story that a writer ventures to tell.
Thus the answer is to set the mood and tone of the play and provide background information