2. How can life have any meaning if we live in a meaningless universe?
Your life can have meaning in a meaningless universe if you have the illusion that it does, but then you can't trust any of your beliefs, such as materialism and atheism, because they might be illusions too.
As usual William J. Murray says it better than I. All that follows is his:
1. Whether or not the universe is determined, the logically consistent moral subjectivist admit that under materialism, all things are ultimately explicable by the interactions of matter and energy under the guiding influences of natural law and mechanical probability.
2. Matter and energy are neither conscious or intentional agencies under materialism, but rather only produce effects that we label with those terms. However, those labels – under materialism – do not and can not indicate anything categorically different from matter and energy interacting according to law and probability. There is no such thing as anything “intervening” in the lawful and probabilistic outcomes of material processes because there is nothing exterior to such processes that can intervene and change them from their normal course.
3. This means that conscious thoughts and intentions cannot suspend or intervene on the ongoing material processes; they are nothing more than product of or a part of those selfsame material processes. The sensation of an ought cannot physically intervene, suspend or change the normal, natural course of matter and energy interacting according to physical law and mechanical probability.
The crucial point here is that while the sensation of an ought might be part of a sequences of events, and the temporal location of that sensed ought might be at the point where ones actions appear to change, the sensation of locally commanding the ensuing action in a top-down, mind-over-matter fashion is necessarily an illusion, because both the sensation of the ought and the “decision” to change physical course are entirely produced by ultimately non-conscious, non-teleological, bottom-up interacting materials and forces.
4. Under materialism, there is no top-down ghost in the machine or emergent capacity available that can intervene in the natural procession of material interactions. Any so-called “emergent properties” are simply variant expressions of natural law and mechanical probability in certain specific conditions, ultimately generated entirely by bottom up, non-conscious, non-teleological matter & energy.
5. So, under materialism, mind and morality can be accurately categorized as delusions, mirages of top-down, deliberate, prescriptive control, sensations manufactured by happenstance interactions of non-conscious, non-teleological matter that can have no prescriptive power whatsoever to alter the course of the normal, lawful and probabilistic behavior of matter.
Under materialism, the self is nothing more than a set of illusory qualia entirely produced and directed by law and probability, existing as nothing more than a kind of happenstance-generated internal hologram that is along for the ride, so to speak, as the interacting matter (that is producing the local hologram of self) does whatever it does anyway.
All that mind and morality can be is a description of sensation and they cannot have any prescriptive power to intervene or change material processes because that’s all they can be in the first place. A hologram cannot deliberately change its “programming” in any rational sense; its programming (what it does) is entirely generated by natural law and probability even if, from the hologram’s perspective, it appears as if he is doing it independently of natural law and/or probabilities, as if he has independent agency.
It would be no more different than if a rock had consciousness and felt like it was making a decision to move every time it happened to move. The sensation of the teleological “decision” is concurrent with the movement but cannot represent a true top-down command of the movement because materialism doesn’t offer top-down, teleological control even from emergent properties.
To sum up: under materialism, mind and morality are delusions of independent prescriptive power that a programmed hologram of “self” experiences while being carried wherever natural law and mechanical probability take it and while being whatever natural law and mechanical probability make it.