Unlike bony fish, sharks do have pupils that dilate and contract. Just like humans, a shark has a retina, a cornea, a lens, and pupil. The retina has two types of cells, rods and cones. Sharks, however, have more rods which are better for perceiving differences in light intensity.
Now, how do you tell when a shark is awake? Well, while humans aren’t the most popular dish for sharks, it’s probably a bad idea to sneak up on one and whisper, “are you awake?”. Sharks are a bit of a mystery but we know its senses are keen, so chances are if you happen to be swimming around close enough to see one, it would know you were there.
The original question, of course, begs for a rewrite: do sharks sleep? Sleeping is different for sharks than humans. Sharks rest by slowing down their brain functions, but they still maintain an awareness of their surroundings.
The moral of the story: sneaking up on a shark—awake or dreaming—is dangerous.