William Shakespeare's second tragedy, Romeo and Juliet (the first was Titus Andronicus), was written between 1591–1595 and was first published in an unauthorized and somewhat corrupted version in 1597.
Romeo and Juliet is set in Verona and Mantua, Italy, during the period of the Italian Renaissance.
This doesn't help us determine the year in which the action of Romeo and Juliet is set, since the Italian Renaissance is considered to have spanned the period from the 1340s until the 1550s, or even into the 1600s, depending on which historians you ask.
One of the earliest depictions of the Romeo and Juliet story not set in antiquity is a novella written by an Italian poet, Masuccio Salernitano, who stated that the events in the story occurred during his lifetime, in the mid-1400s.
Another Italian writer, Luigi da Porto, wrote a version of the Romeo and Juliet story, and he insisted that the events in his version of the story took place in the 1300s, a century before Salernitano's version.
Girolamo del Corte told the story of Romeo and Juliet in L'istoria di Verona, published in 1594, claiming that is was a true story which took place in 1303.
Shakespeare might have followed the example of these writers and set his play in the 1300s or 1400s, or he might have set it closer to his own time period.
There's very little in the play itself which helps us to date the action of the play. The Nurse talks about Juliet's upcoming birthday, and says that she was born on "Lammas Eve at night" [1.3.21], which Lady Capulet tells her will be in "A fortnight and odd days" [1.3.19], a little over two weeks. "Lammas" is a feast that celebrates the first harvest, which generally happens around August 1, so we can be fairly certain that Romeo and Juliet takes place in mid-July.
As for the actual year in which Romeo and Juliet is set, the Nurse remarks in Act 1, Scene 3," 'Tis since the earthquake now eleven years" [1.3.27]. There was an earthquake in Dover, England in 1580, which seems to set the play in 1591. It's more likely, however, that this is a clue as to when the play was written, rather than in what year it's set.
The best guess of Shakespeare scholars is that Romeo and Juliet is set in the 1300s or 1400s. However, it's the universal appeal of Shakespeare's story of the "star-crossed lovers" that allows Romeo and Juliet to be set equally effectively in any time period.