This is a quite interesting question. The first issue is that the play is, after all, fictional, rather than portraying an actual historical event. It does not mention any events by which we could date it accurately; it is a love story rather than an historical or political drama. It is, however, set in a time and place that would have been exotic or alien to Shakespeare's audience, in the distant land of Italy. Part of the reason for this is that it allows people to behave in ways that would be considered improbable were the characters English; the over the top behavior and emotions, however, were ones that an English audience was willing to see as characteristically Italian.
There were actually several versions of the tale of Romeo and Juliet before Shakespeare wrote his play, and from which he derived the basic plot. The best known of these was Arthur Brooke's 1562 poem, The Tragicall Historye of Romeus and Iuliet.
The original sources, though, for Brooke's poem go back even earlier, to the tale of "Mariotto and Ganozza" by Masuccio Salernitano (1410–1475), adapted by Luigi da Porto (1485–1529) as "Giulietta e Romeo". Thus the kernel of the story would have been set in fifteenth-century Italy.
The year is not mentioned in the text. The Nurse does talk about an earthquake: "'T is since the earthquake now eleven years..." (Romeo and Juliet, I.iii, line 22). Many scholars believe this was the Dover Straits earthquake of 1580, which would then place the action in 1591.