Yellow is the colour the eye picks up first in daylight. That is why it marks the edge of a step, the handle of a tool and the line you should not cross.
Borrowing from industry
Designers like yellow for the same reason engineers do: it gets attention without asking for it. Used once on a page or a facade, it tells you exactly where to look.
Once is enough
Used everywhere, it stops meaning anything. The best yellow is the one you only see where it matters.