The European Commission has regulations in place for all production processes to control the quality, weight and shape of consumer goods. Bananas are not an exception.
Council Regulation (EEC) No. 404/93 regulates the common market organisation for bananas. Some of its goals include the improvement of the products' marketing, making sure that they remain competitive and that resources are used in an environmentally-friendly manner. However, unrelated to these objectives, the regulation provides "a common tariff for all products."
Going into greater detail, there is a later Commission regulation, from 1994. After defining in great detail in an annex what a banana is, it then notes what features a quality product must have. They should be green and not ripe, with no pistils. They should not have any strange odours or stains. Pesticides may be used, but in low amounts. They must not have bruises or present any "malformations or abnormal curvature".
Source: gaceta.es