A professor of mine in grad school had visual hallucinations from basilar migraines. Since I was diagnosed with chronic daily migraine in the middle of grad school, she became really open about how she would sometimes have hallucinations while lecturing. Her favorite story was the day she saw a gold, shimmery scorpion crawling up the wall. Basilar migraines carry a higher risk of stroke, so it is important to notify your doctor about the current change.
I have auditory hallucinations during particularly bad storm systems, as my migraines are primarily triggered by barometric pressure change and other weather factors. It often sounds like a distant radio station. It drives me bonkers.
The combined stress of studying for the bar and having a bad migraine can push a fatigued brain into a variety of states, especially with increased caffeine intake, dehydration, or other factors. Be sure to talk to your doctor. It seems embarrassing (and pretty terrifying) but as a part of the medical community, I can vouch that an informed physician doesn't make judgmemts. Stress management through a trained counselor is also amazing. It's pretty much the only way I made it through my grad studies and boards.