The price mechanism is an indicator of how much consumers/society value a given product. It is the value allocated to each product & signals what to produce. This could be seen on the example of a market for electric cars. If there/s been a change in preferences & tastes and those cars are now fashionable, or a producer has run a successful marketing campaign and thus caused an increase in demand and quantity sold. This signals to the producers that there is profit in producing those cars, and there is excess demand to be fulfilled. Thus the price is allowed to rise to allow for greater quantity of electric cars being produced and sold.
(This answer should be accompanied by and reference an appropriate diagram.)