Has there ever been an in-universe explanation?
Yes, it was a powerful psychic block placed within the Martians by the Guardians of Oa, to inhibit and prevent the Martians from using their formidable genetic talents for conquest.
Twenty thousand years ago they were known as the Burning Martians. This race was constantly ablaze and they desired the feelings of suffering and torment in others. They depended on the heat of an inferno and the psychic suffering of others in order to reproduce.
They waged violent internal wars for centuries but at the point where their technology was advancing enough that they could pose the serious threat of interstellar conquest, the Guardians of Oa stepped in, instilling in them the physical and psychic weakness to fire that would come to define the Green and White Martian races.
The fear of fire is a psychosomatic one, meaning whenever Martians are exposed to fire (the only thing that would let them recombine into a Burning Martian) they would immediately lose all of their genetic capacities and become vulnerable to attack. This left the Martians still quite powerful but easily able to be cowed by species of sufficient capacity (or at least having access to fire, underwater species might be in trouble...).
The Martian Manhunter has lived on Earth long enough he has developed a degree of resistance to the existence of fire and can operate to a greater degree than most Martians.
The Guardians of Oa vs the Burning Martians – JLA #87, DC Comics
It was eventually retconned that the White Martians and Green Martians did not originally co-inhabit Mars together as was previously believed. In reality the green and white Martians were part of the same race, known as "The Burning".
The Burning Martians used fire to reproduce asexually and were belligerent to all. The Guardians of the Universe, fearing the ruthlessly and violently powerful Martians, genetically split the Martian race into two distinct species, white and green, preventing the asexual reproduction.
They also gave these two new races an instinctive fear of fire to prevent either group from ever accessing their full potential. Also they altered their powers so one race could never completely overcome the other.
The timeframe for this genetic tampering was given as 20,000 years ago, contemporary with the early life of Vandal Savage on Earth, in JLA series 2 #86. Wikipedia: White Martians