I would recommend going to see your dentist
as soon as possible. There are several possibilities here, and your dentist will need to examine your teeth and braces
inside your mouth to figure out exactly what is going on.
One possibility is that you chipped or cracked a tooth. This can happen when you bite down on something hard, such as the candy that you were eating, and a popping sensation followed by pain would be a common set of symptoms to experience if this happened.
It is also possible that you displaced one of the wire bands holding the braces together. This could also cause a popping sound and, if you look in your mouth, you may be able to see if a wire has become dislodged.
Your dentist will be able to evaluate you quickly and figure out what this is. If it is a dislodged wire, that should be easily replaced. If it is a chipped or cracked tooth, that will need immediate dental treatment to prevent worsening of the defect or a cavity in the tooth.
In the future, your dentist will also want to remind you to refrain from eating hard chewy foods like this while you have braces!