Transition to turbulence represents one of the most intriguing natural phenomena. Flows that are smooth and ordered may become complex and disordered as the flow strength increases. This process is known as transition to turbulence. In this dissertation, we develop theoretical and computational tools for analysis and control of transition and turbulence in shear flows of Newtonian, such as air and water, and complex viscoelastic fluids, such as polymers and molten plastics.Part I of the dissertation is devoted to the design and verification of sensor-free and feedback-based strategies for controlling the onset of turbulence in channel flows of Newtonian fluids. We use high fidelity simulations of the nonlinear flow dynamics to demonstrate the effectiveness of our model-based approach to flow control design.In Part II, we utilize systems theoretic tools to study transition and turbulence in channel flows of viscoelastic fluids. For flows with strong elastic forces, we demonstrate that flow fluctuations can experience significant amplification even in the absence of inertia. We use our theoretical developments to uncover the underlying physical mechanism that leads to this high amplification. For turbulent flows with polymer additives, we develop a model-based method for analyzing the influence of polymers on drag reduction. We demonstrate that our approach predicts drag reducing trends observed in full-scale numerical simulations.In Part III, we develop mathematical framework and computational tools for calculating frequency responses of spatially distributed systems. Using state-of-the-art automatic spectral collocation techniques and new integral formulation, we show that our approach yields more reliable and accurate solutions than currently available methods.