You have an intuition on this, even if you cannot articulate it probably. Every major vector of our existence is derived somehow from this intuition: why we make children, why we try to preserve our existence, why we help others, why we don't kill each other.
I would postulate that our everyday moral code can be derived from this intuition on "the meaning of life". The major religions captured it in slightly different ways; however there seems to be something more unifying behind various religious dogmas. I believe there is something very convergent in the intuition that we each have about the meaning of life.
But wait; is there really a meaning of life?
I would answer this by paraphrasing the Descartes's quote "I think, therefore I am". If there would not be any meaning of life, then there would be no meaning in everything we could do. The answer to this question would be meaningless too. If there is no meaning, it does not matter if we answer this question right. It does not matter if our life is happy or we live the worst sufferings we could imagine. Actually, the life would not exist at all; it would be only a strange atom vibration and no one to notice it.