What would happen to your eyes if you keep them open for 24 hours?

Corneal damage. The cornea (front window of the eye) needs to remain lubricated in order for vision to be sharp. The skin on its surface will break down if the eye dries out, increasing the risk of infections. Assuming you are asking about staying up for 24 hours while blinking normally (rather than forcing the eyes not to blink), as long as the eyes are lubricated, the worst case would be strain and "tired" eyes.
Exposure keratopathy. Essentially, the exposure would damage the cornea (keratopathy) and lead to scratches, decreaesd vision, pain, light-sensitivity, and possibly infection.