Ez lámpa. -> simply tells you the name of the object (e.g. if you don't know the name of that thing, you are given the solution).
Ez a lámpa -> in this case - for whatever reason - "lámpa" (or that "lámpa") has already been mentioned earlier, so you are not only given the name of the object but also an indication that you and the answer giver know "what" lámpa you are talking about. Alternatively, if it is understood that you are talking about objects in the room you are in, the object in question can be considered as definite for that reason.
Or you can consider that "Ez lámpa"="This is a lamp." meanwhile "Ez a lámpa"= This is the lamp" (we were talking about earlier, or is definite because we are talking about the objects around us, not about lamps/names objects in Hungarian, in general.)
Agreeing with Zsanna, I'd summarise it in the following way: practically we have three possibilities in Hungarian.
Ez a lámpa (= Das ist die Lampe - a concrete/already mentioned/known/etc. lamp )
Ez egy lámpa (= Das ist eine Lampe - one of the existing lamps, not a concrete/particular one)
Ez lámpa (= Das ist eine Lampe - an object that is lamp and not something else)
(I wonder if in German the sentence Das ist Lampe is grammatically erroneous or only not used or not quite idiomatic ....)
Yes, that's right. Maybe a bit more help with the meaning:
Mi ez? (->Mi a neve (ennek)?= What is the name of this thing?) - (Ez) Lámpa. (The "ez" is not necessary, especially as it appeared in the question already, you can give just the name of the object.)
Mi ez? (-> What is it used for?/What does this thing do? It is an object I don't recognize/know.) - (Ez) Egy lámpa.
Mi ez? (-> What is this (/object for)?) - Ez a lámpa. (... that I mentioned earlier, this is what we are going to use for the night excursion.)
Of course, there are other possible approaches equally, I just picked what came first to my mind.