Games don't cause epilepsy, but they can act as a trigger for people who already have photosensitive epilepsy.
Rapid flashing, high-contrast patterns and strobing effects are the risk, which is why most games carry a photosensitivity warning before the title screen. If you or someone you play with is susceptible, sitting further from the screen, lowering brightness and taking regular breaks all reduce the risk.