The advent of graphene and related 2D materials1,2 has recently led to a new technology: heterostructures based on these atomically thin crystals3. The paradigm proved itself extremely versatile and led to rapid demonstration of tunnelling diodes with negative differential resistance4, tunnelling transistors5, photovoltaic devices6,7 and so on. Here, we take the complexity and functionality of such van der Waals heterostructures to the next level by introducing quantum wells (QWs) engineered with one atomic plane precision. We describe light-emitting diodes (LEDs) made by stacking metallic graphene, insulating hexagonal boron nitride and various semiconducting monolayers into complex but carefully designed sequences. Our first devices already exhibit an extrinsic quantum efficiency of nearly 10% and the emission can be tuned over a wide range of frequencies by appropriately choosing and combining 2D semiconductors (monolayers of transition metal dichalcogenides). By preparing the heterostructures on elastic and transparent substrates, we show that they can also provide the basis for flexible and semi-transparent electronics. The range of functionalities for the demonstrated heterostructures is expected to grow further on increasing the number of available 2D crystals and improving their electronic quality.