Dear, it is of course bad. Hair relaxer is one kind of chemical, which is very irritable. Get relaxer into eyes will make your eyes burn and red. It is very uncomfortable that you can't open your eyes. The best for you to do now is use the water to flushing your eyes. Keep doing this until you feel the burn is gone. Then you can put some ice on your eyes to make you feel better.
When you open your eyes, you might find your eyes are red. Have a rest of your eyes. The redness will gradually gone off, so as the pain in eyes. If after about 15 minutes, the redness still doesn't go, you still feel vision blurred, eyes burn, you should go to see the doctor to make sure is there serious problem caused to your eyes. Anyway, eyes are very delicate and vulnerable, you should take good care of it, and be careful with anything get close to eyes. Hope you could get better soon.