Hybrid semiconductor-polymer nanostructured solar cells hold the promise of photovoltaic energy conversion based on abundant and nontoxic materials and scalable manufacturing processes. After a decade of intense research activity, hybrid solar cells still exhibit low short-circuit currents and moderate open-circuit voltages. These bottlenecks call for a detailed understanding of the physics underlying the device operation at the nanoscale. Using first-principles calculations the ideal energy-level alignment of hybrid solar cell interfaces based on the wide bandgap semiconductor ZnO and the polymer poly(3-hexylthiophene) (P3HT) is investigated. The interfacial charge transfer is quantified and it is shown that this effect increases the ideal open-circuit voltage with respect to the electron-affinity rule by as much as 0.5 V. The results of this work suggests that there is significant room for optimizing this class of excitonic solar cells by tailoring the semiconductor/polymer interface at the nanoscale.