Romeo isn’t supposed to go to the party because he is a Montague and his family is in a feud with the Capulets.
The feud between the Montagues and the Capulets has been ongoing for years. Shakespeare never even tells us what started it. It is clear that it is tearing Verona apart. Everyone that has an association with either family, from the servants to the heads of household, is drawn up in the feud.
For this reason, the son of a Montague going to a party for the daughter of a Capulet would be normally considered a bad idea. As far as Romeo’s friends Mercutio and Benvolio are concerned, however, a party is a party! They convince Romeo to go because he has been pouting since breaking up with his girlfriend, Rosaline (also a Capulet).
So Romeo goes to the party. Tybalt, a Capulet with a bad temper, is angry to see him there. He wants to fight Romeo for being a Montague and crashing a Capulet party.
This, by his voice, should be a Montague.
Fetch me my rapier, boy. What dares the slave
Come hither, cover'd with an antic face,
To fleer and scorn at our solemnity?
Now, by the stock and honour of my kin,
To strike him dead, I hold it not a sin. (Act 1, Scene 5)
Lord Capulet, Juliet’s father, refuses to allow it. He does not want to ruin the party. He also comments that Romeo seems to have a good reputation. What could it hurt? He can stay at the party because he will conduct himself honorably, and everyone will have a good time.
Of course, we all know how the story ends. Romeo sees Juliet and is enraptured. When he asks who she is, he is shocked to find out that she is a Capulet. Juliet has the same reaction to finding out Romeo is a Montague.
My only love sprung from my only hate!
Too early seen unknown, and known too late!
Prodigious birth of love it is to me,
That I must love a loathed enemy. (Act 1, Scene 5)
The two fall in love at first sight, in a classic head-over-heels sonnet-sharing case. They decide they do not care what their families would think, because they are meant to be together. Romeo vows to give up his family name if it means he can be with Juliet. Juliet decides that names do not mean much. They both go through with it and end up secretly married.
In retrospect, Romeo should never have gone to the party. It would have saved his life, as well as the lives of Mercutio and Juliet. He seems to be a passionate young man. He likely would have fallen in love with some other, less dangerous girl if he hadn't gone. Unfortunately, Shakespeare tells us the two were star-crossed. Their destiny and their doom was fated.