The play shows that the most important part of one's identity is how one feels and behaves and has nothing to do with one's name or what one is called. Consider how easily Juliet is willing to give up her identity as a Capulet. She says,
O Romeo, Romeo, wherefore art thou Romeo?
Deny thy father and refuse thy name,
Or, if thou wilt not, be but sworn my love,
And I'll no longer be a Capulet. (2.2.36-39)
Even if Romeo is unwilling to give up his identity as a Montague, Juliet is quite willing, even eager, to give up her name and status and family because it is her love that she feels to be more a part of her than any of those things. Further, she argues that "Romeo would, were he not Romeo called, / Retain that dear perfection which he owes / Without that title" (2.2.48-50). In other words, she is not in love with Romeo's name -- he could be called anything and she would still love him because his "dear perfection" has nothing to do with his name.
When Romeo reveals himself, he agrees that words form no part of his identity and that if he had his name written, he "would tear the word" (2.2.62). He goes on to discuss his love of Juliet and how it helped him to climb the high walls, how it would protect him from her murderous kinsmen even if they found him in her garden. The only thing that will satisfy him is "Th' exchange of [her] love's faithful vow for [his]" (2.2.134). It is their love for one another that gives them identity; they are both willing to sacrifice everything else by which they are known (family, status, Verona, even LIFE) in order to do justice to the love that they feel. Thus, it would seem that who and what one loves, and one's loyalty and commitment to that love, are crucial to identity, more crucial than just about anything else.
In Romeo and Juliet, the characters are judged on account of their names. The Montagues hate the Capulets, and vice versa. It doesn't matter what a person is really like, only what their name is.
However, the characters of Romeo and Juliet challenge this. Their love shows that they do not connect identity with name. In one of Shakespeare's most famous quotes, Juliet says the following:
"What's in a name?/a rose by any other name would smell as sweet."
This demonstrates that identity is a result of define charactersitics about the person himself, and not tied into the name - or even the background - of that person.