Plastics are almost always going to be cheaper to produce, and their light weight makes them cheaper to transport.
Plastics generally take less energy to make, but glass is easier to recycle (if one ignore transportation costs).
In general we have seen a continual decline in the use of glass as a packaging material, because of cost of production, but at least as much because of the cost of transportation (due to weight). Glass is also impossible to incinerate.
Glass has its advantages, because of its hardness (scratch resistance - although some plastics are improving in that regard), optical qualities, and relative inertness.