There are some non-standard things going on here, but for the most part this is the basic countable versus non-countable rule.
In general, if a noun refers to something that you can count, you must precede it with an article, a number, or some word indicating a quantity. If a noun refers to something that you can't count, then you don't use the article or number.
So for example, "I ate a sandwich." Sandwich is countable: you could have one sandwich, two sandwiches, etc. But "I drank milk." You don't normally talk about "one milk" or "two milks". (But we'll get back to this in a moment.) Chocolate is a general term for a substance, so you'd say, "I like chocolate." But you can make countable things out of this substance, like "I ate a chocolate bar" or "I ate a slice of chocolate cake."
But now we get to a lot of non-standard usages. People will often say, "I ordered a coffee". This is really short for "I ordered a cup of coffee", but in practice we turn the non-countable noun into a countable noun. "The waitress brought three beers" means she brought three glasses, bottles, or cans of beer, etc.
Similarly, people use "chocolate" as a countable noun to refer to small pieces of specialty chocolate candies (like Witman Samplers or your typical Valentine chocolates). So "I ate two chocolates" means "I ate two of those small pieces of chocolate candy." You would not normally use "a chocolate" to refer to a full-size candy bar, like your typical Milky Way or Mars bar or whatever. (Why? I have no idea. That's just how it is.)
"Pizza" is used as both a countable and non-countable noun. "I ate pizza" means some unspecified quantity. "I ate a pizza" means you ate an entire pizza pie. The word "pizza" is rather unusual this way.
"Noodles" is countable, but we normally eat them in fairly large quantities so we rarely really count them. No one says, "I ate 47 noodles for lunch", it's just "I ate some noodles" or "I ate noodles". But it's still a countable noun and, I think, consistently used as such. We just don't give a specific count very often.