Also, before they became standard, were there competing alternatives?
hi! it might be worth x-posting this question to /r/AskScience, or even a sub specializing in pharmacy, assuming one exists.
Why are the containers orange? Many chemical compounds used in medicine are photosensitive. That is to say, they break down or become inactive when exposed to certain wavelengths of light. You can stop this by putting your medicine in an opaque container, but then you can't see what's inside. Instead, you can tint the container so that only the low energy reddish light makes it through. Red light doesn't have enough energy to disrupt most chemical bonds, so your medicine is both stable and in a transparent container.
As for why the containers are plastic, it's mostly down to cost. The containers prescription drugs come in are blow molded plastic made in a process similar to soda bottles, so each one costs maybe a fraction of a cent to produce. Before the advent of plastic, medicines would often come in brown glass bottles, which are much more expensive and fragile in comparison.
Fun fact: beer, wine, and whiskey are often sold in brown bottles for the same reason: many of the flavor compounds in alcoholic drinks are photosensitive. Of course, some alcoholic drinks come in clear bottles, but those that do are meant to be drunk immediately, not aged in a cellar.