The effect of the confinement of pi electrons in one- and two-dimensional domains is illustrated with several examples ranging from linear polyene chains to planar molecules with honeycomb structure. Theoretical computations and specific Raman experiments on molecular materials demonstrate that a molecular approach provides a unified key to the interpretation of the Raman response both of linear polyconjugated polymers (polyacetylene) and of nanostructured graphitic materials.