Maybe the writers have kept a little distance portraying future human religion because they are unwilling to ruffle feathers by showing how our belief systems might change if life on other worlds is discovered?
The Star Trek writers are not exactly the bravest group of people. The safest course of action (if you want to go that route) would be to show modern religions as essentially intact in the future, while showing aliens as possessing their own unique faiths. And yes have a certain number of characters being either agnostic or atheist.
If some religions have a hard time adjusting to changing beliefs like gay rights and a woman's right to choose abortion
True some do.
Religions are composed of individuals, some religions have over a billion members. The members are all going to have their own thoughts on the dogma of their particular religion. The Pope has declared that the sin of abortion can be absolved in the confessional, but he also said
"I wish to restate as firmly as I can that abortion is a grave sin, since it puts an end to an innocent life."
Whether you personally consider a fetus to be life (or innocent) is a individual viewpoint.
how will they deal with alien life if that life has no religion or a fundamentally different belief system?
The same as they deal with such in modern day society. Either with indifference, tolerance (if not acceptance) or with rejection, depend on the precepts of a given religion, and the personal behavior of individuals.
How would a atheist deal with the existence of alien religion? Tolerance or condemnation?
If we have people who believe the world is just a few thousand years old
If you're referring to the "young Earth" hypothesis, relatively few Christians adhere to that. The Earth is created in six days, but the term "days" can be seen as meaning periods or events.
The Quran says the Earth was created in six days, but the term "youm" (day in Arabic) can be used in different way. In one passage in the Quran (70:4) the term youm refers to a time period of fifty thousand years.
Jews (as it was described to me) do hold that the "days" in the six days of creation are "different."
Hindus have the event of creation at over 155 trillion years ago, that number involves a large number of deaths and rebirths of the universe.
what will those people think of an alien race that claims they have existed for millions of years and have a recorded history to prove that?
Probably come down to "good for them."
Interesting possibilities for debate here.
Agree.
In the Federation, the member species likely have religions by the thousands. I can't see the Federation having one main religion, but I also can't see the federation being mostly atheist either.