If the average person went to go see Hamlet, would they know who wrote it? I guess this applies to all medieval/renaissance theatre in general.
It depends on which version of Hamlet we're talking about. Almost all modern versions of Hamlet are combinations of 3 surviving early texts that are quite different from one another: The First Quarto of 1603 (aka The Bad Quarto), The Second Quarto of 1604, and The First Folio of 1623 (the first attempt at an official complete works). It is therefore widely presumed that the play underwent multiple revisions and that a more-or-less "complete" version of Hamlet was being performed on stage by 1601-02. However, in the introduction to the Arden Shakespeare 2nd Edition version of Hamlet (page 83), editor Harold Jenkins notes a possible reference to a play called Hamlet in 1589:
... and if you entreat him fair in a frosty morning, he will afford you whole Hamlets, I should say handfuls of tragical speeches.
That brief mention by Nashe suggests the existence of either an earlier version of the play by another author, or possibly an Ur-Hamlet by William Shakespeare that he would continue to develop for more than a decade. There are other early mentions of a play called Hamlet (Philip Henslowe's diary in 1594 and Thomas Lodge in 1596) that mention no author by name but bolster the theory that the play was a long-term pet project that Shakespeare revised throughout his career.
So back to your question, presuming that one or more Ur-Hamlets existed:
If you saw Hamlet in 1589, the audience might know Shakespeare's face as an actor, but probably not his name as a playwright. This would have been among Shakespeare's first forays into writing plays. Contemporary with The Two Gentlemen of Verona and the 3 parts of Henry VI, the poetry would have probably been somewhat restrained and unremarkable compared to other London playwrights of the day.
If it's 1596 and an audience just saw a recently updated Hamlet, those who visited the theaters frequently would probably have heard of William Shakespeare. There would probably have been a dramatic improvement in the quality and fluidity of the poetry in the last 7 years. At this point he had written at least a dozen plays and at least two known legitimate hits that would be remounted multiple times during his career (Richard III and Romeo and Juliet). Shakespeare was prosperous enough at this point to buy into the Lord Chamberlain's Men and start producing as their in-house playwright. His name was already being used (sometimes without his permission) to sell books.
After 1603, the locals within an audience seeing Hamlet would have almost certainly been familiar with Shakespeare. King James I became an official patron and The Lord Chamberlain's Men became The King's Men. The Globe Theatre had been completed, giving Shakespeare's plays a permanent artistic home, and The Bard would have been at the pinnacle of his career in terms of writing. If a playgoer knew the name of only one living English playwright between 1603 and 1614, that name was probably William Shakespeare.
hi! there are some Shakespeare experts here who may respond, but meanwhile, you may find something useful in these earlier posts: