I can't say the X-Files usually would try to follow a real-life story in its episodes.
However, in many instances, I noticed the show to get inspiration for episodes from real-life information and feature many interesting facts. They are usually mixed with fiction so it's hard to tell without checking.
For example, in Season 1 episode 19 "Darkness Falls", Mulder and Scully got locked up in the woods with a saboteur (or alternatively an eco-terrorist) named Spinney, this dialog takes place:
MULDER: When Mt. St. Helens erupted, there was a large amount of
radiation that was released from inside the earth. Strange things
started to grow. There’s actually this lake where they’ve discovered a
kind of amoeba that can literally suck a man’s brains out.
SCULLY: Oh, a brain-sucking amoeba.
SPINNEY: No, it’s true. Spirit Lake. And there’s documented cases of
swimmers being infected.
This is actually a real-life reported event. The amoeba is called Naegleria fowleri.
Things like this are usually not listed in the episode guide, so you can't claim the story is based on real-life events, but often if there is real-life inspiration for the episode it is incorporated in the dialog in a similar fashion to this.
As a rule of thumb, once per episode, if you hear something briefly mentioned that is exact it's worth checking. Often one or more characters go into citing some exact-sounding information to provide a feel of "historical context", and often the data is real-life.
Don't expect them to always refer to actual organisms like this amoeba but the show usually (attempts to) accurately refer to folklore as such, historical mysteries, interesting organisms, unanswered questions in science, or other astonishing real-life stories they find, and then they turn on their imagination and do something with it.
By the way the show itself takes its roots on such different real-life controversies as studies by Mack M.D. on abductions, the Watergate scandal or the assassination of JFK.
real-life events
!!