Obviously inspired by this striking photo on the front page of r/pics
The redheaded gene (V6OL) is believed to have first come around about 50,000 years ago, back when humans decided to leave Africa in pursuit of a less hot and arid biome.
As a consequence of us leaving Africa, some of us developed the V6OL gene, which made our skin paler. This, of course, means that people with the V6OL gene were weaker to sunlight than most. To adapt against the sun, it's believed that we developed red hair, which protects against the sun and helps smoothen the process of absorbing Vitamin D.
Because the weather in Ireland and Scotland tend to be more "gloomy" than most places, it only makes sense that the gene persists.
If both parents are redheaded, there is a very large chance that their child will be as well.
Tl;dr: We sought out a more gloomy climate, developed V6OL to protect against the sun, and Ireland continues to have many redheads due to many redhead allele carriers in the region.
Edit: omitted "redheads dying out" fluff
Follow-up: is there any truth to the claim that red/light hair among the Irish is actually a Scandinavian trait which was spread during the viking settlement of Ireland, or is that a myth? I've heard that claim a few times but I dunno if history actually supports the idea that Scandinavians so thoroughly displaced/interbred with Irish natives.