According to wiktionary material noun is another name for mass noun, which is uncountable.
Some nouns can be used indifferently as mass or count nouns, e.g., three cabbages or three heads of cabbage; three ropes or three lengths of rope. Some have different senses as mass and count nouns: paper is a mass noun as a material (three reams of paper, two sheets of paper), but a count noun as a unit of writing ("the students passed in their papers").
(Source: mass noun on Wikipedia)
To answer your question, sometimes you can use an article in front of a noun which, in other occasions, is a mass noun. But it is not always the case.
I ate some cake - mass noun; but in another context, I baked a cake (or two cakes)
They bought 50 acres of land - mass noun; but it can have an article A wonderful land
For other mass nouns such as water, you can use the definite article, as in "the water is cold", but you can't use the indefinite article "a" with "water" (by itself). However you can have compound expressions using "water" which are countable, so they can have the indefinite article, such as a water polo tournament.
Are egg, earth,nail, sun and moon material nouns?
Egg can be a used as a mass noun (you can have some egg for breakfast) but more commonly it is a countable noun.
Earth can be either material (dirt, soil, ground) or a proper noun (planet Earth, or the Earth or just Earth). Using earth as a countable noun (many earths) is possible but unusual.
Nail, sun and moon are countable nouns, although the Moon and the Sun are also proper nouns for the specific sun and moon related to the Earth.