In your question, you mentioned being confused about the usage of an article in conjunction with "life": "Sometimes I see an article (a and the) before the noun (life) but sometimes I also see the noun without any article"
Here's my take on it :
If you were speaking about a person's or, say, a pet's life, you should use an article before the word. In other words, if you were talking about a particular life..
Eli led an exemplary life and was a great inspiration to all those around him.
Liza lived a good life before we had to put her down.
The life of a dragonfly is short but filled with action.
...and if you were talking about life in general or the very nature of life then there's no need for an article, usually.
Life can be so hard sometimes.
If life gives you lemons, squeeze them in people's eyes.
It is not the length of life, but the depth that matters.
I know it's probably more complicated than the overly simple explanation I gave above, but I thought you'd have a better understanding with a couple of examples.