On the one hand, you want to write about real-world issues. On the other, your audience expect a bit of zap-bam-pow. So you have to give your characters super-powers. These, perhaps, are a metaphor for the untapped talents of minorities. It is notable that other 'talented' individuals who are not part of that minority are nevertheless more accepting of them - Spider-Man has been a frequent ally of the X-Men.
Be it noted that there are two threads that run through X-Man history. One has been conflict with other Mutant groups who have a different ideology, Magnetos' Brotherhood and Sebatian Shaws' Hellfire Club.
Another has been the notion that power often comes at a cost. Not all the Mutants powers are a blessing. Cyclops cannot control his eye-beams but must wear a special visor or glasses. Rogue cannot make skin-to-skin contact with anyone without draining them of their abilities and memories. - an experience often traumatic for both parties. Wolverines' adamantium skeleton is toxic, and places a strain on his healing factor, but without it, he would degenerate into a monster. Nightcrawlers' powers come with a physical appearance that many find scary. These are studies of individuals facing difficult choices and coping with chronic conditions.
That the themes and stories flow and alter with the times reflects not only the different writers, but also audience expectations.