We analyze the emergence of correlated optical phenomena in the transmission of light through a waveguide that confines classical or ultracold quantum degenerate atomic ensembles. The conditions of the correlated collective response are identified in terms of atom density, thermal broadening, and photon losses by using stochastic Monte Carlo simulations and transfer matrix methods of transport theory. We also calculate the "cooperative Lamb shift" for the waveguide transmission resonance, and discuss line shifts that are specific to effectively one-dimensional waveguide systems.