A functionally graded Al-doped ZnO structure is presented which combines conductivity, visible transparency and light scattering with mechanical flexibility. The nano and meso-architecture, constituted by a hierarchical, large surface area, mesoporous tree-like structure evolving in a compact layer, is synthesized at room temperature and is fully compatible with plastic substrates. Light trapping capability is demonstrated by showing up to 100% improvement of light absorption of a low bandgap polymer employed as the active layer.