The merger of nanoscale building blocks with flexible and/or low cost substrates could enable the development of high-performance electronic and photonic devices with the potential to impact a broad spectrum of applications. Here we demonstrate that high-quality, single-crystal nanowires can be assembled onto inexpensive glass and flexible plastic substrates to create basic transistor and light-emitting diode devices. In our approach, the high-temperature synthesis of single-crystal nanowires is separated from ambient-temperature solution-based assembly to enable the fabrication of single-crystal-like devices on virtually any substrate. Silicon nanowire field-effect transistors were assembled on glass and plastic substrates and display device parameters rivaling those of single-crystal silicon and exceeding those of state-of-the-art amorphous silicon and organic transistors currently used for flexible electronics on plastic substrates. Nanowire transistor devices have been configured as low-threshold logic elements with gain; moreover, the high-performance characteristics are relatively unaffected by operation in a bent configuration or by repeated bending. The generality of this approach is further illustrated with the assembly of gallium nitride nanowire UV-light-emitting diodes on flexible plastic substrates. These results suggest that nanowires could serve as high-performance building blocks for the next of generation lightweight display, mobile computing, and information storage applications.