I keep seeing jagged flashes of lightning bolts that shimmer around an object followed by an intense headache. Are these hallucinations?

No. These are not hallucinations and you need to be seen by a doctor. Seeing lightning bolts can mean there is eye problem like a torn retina or neurologic problem like a migraine. If you are pregnant, visual changes associated with a headache can indicate a serious complication called pre eclampsia. If you have these symptoms it is very important you see a doctor for further evaluation.
Migraine. This is most likely a manifestation of occipital migraine. It can also rarely be a type of minimal seizure. The next time it happens, if you see the phenomenon in 1/2 of the field of view the same in each eye (cover one eye and then the other), then it is almost certainly migraine. If it does not have this pattern, then you should see a neurologist for evaluation.