In English, "I read by the red lamp" sounds to me as if the red lamp is providing the light for your reading (= I read by the light of the red lamp), but the red lamp could be anywhere, perhaps in the next room.
But the Hungarian can't be used like this, can it? It merely expresses that I am reading, and I am by the red lamp (which may not even be switched on), right?
So, the same as "I am reading next to the red lamp." (Would that be an acceptable translation as well?)
Very interesting question. This sentence does tell me that I am at, or next to, the red lamp. Purely location. Btw., "light" is "fény" in Hungarian. It does not carry the other meanings of "light".
But I can think of sentences, more general ones, that convey the meaning of what provides the light, and not necessarily the location:
"Lámpánál olvasok." - "I read by lamplight."
"Gyertyánál tanulok." - "I study by candlelight."
"A piros lámpánál olvasok." - gives me more of a sense of location.
"Piros lámpánál olvasok." - gives me the sense that a red lamp is providing the light for my reading.
I have a problem with this sentence, because it doesn't say, that the lamp is on or not. It can be day as well and I sit outside in the sunshine and read a book at the red lamp. Both answers should be correct: by and at.
"at" sounds wrong to me with "lamp".
"by the lamp, beside the lamp" but not "at the lamp".
"(He's standing) at the red traffic light" is what I'd say.
I'm not sure why it works with a traffic light but not with a lamp in a room - perhaps because traffic lights are bigger?
Regarding "at the traffic light".
I'm quite sure you prefer using "at" when you have business to do with the object in question - waiting at the door, sitting at the table, walking at the beach.
"By" is rather used if you just happen to be nearby the object, but not interacting with it - waiting by the statue, sitting by the table, driving by the forest.
If "lámpánál" strictly denotes proximity, why would we not say "A piros lámpa mellett olvasok."? And, kind of conversely, if we can say "by" or "next to" just by adding "-nál" or "-nél," why do we need such a thing as "mellett"?
-nál/-nél denotes no certain direction. You're just in the very proximity of the object. Mellett does denote a specific direction: left or right of the object, to the side, be-side.
They are often interchangeable, but not always. If the object in question does not have a certain frontside or direction, it does not matter. But once you get to things like buildings, cars, furniture, etc., it starts making a difference.
Just like "The store is next to my house" (neighbouring) means something different than "The store is by my house" (closeby), so does "Az üzlet a házam mellett van" differ from "Az üzlet a házamnál van."