We study the MHD flow and also heat transfer in a viscoelastic liquid over a stretching sheet in the presence of radiation. The stretching of the sheet is assumed to be proportional to the distance from the slit. Two different temperature conditions are studied, namely (i) the sheet with prescribed surface temperature (PST) and (ii) the sheet with prescribed wall heat flux (PHF). The basic boundary layer equations for momentum and heat transfer, which are non-linear partial differential equations, are converted into non-linear ordinary differential equations by means of similarity transformation. The resulting non-linear momentum differential equation is solved exactly. The energy equation in the presence of viscous dissipation (or frictional heating), internal heat generation or absorption, and radiation is a differential equation with variable coefficients, which is transformed to a confluent hypergeometric differential equation using a new variable and using the Rosseland approximation for the radiation. The governing differential equations are solved analytically and the effects of various parameters on velocity profiles, skin friction coefficient, temperature profile and wall heat transfer are presented graphically. The results have possible technological applications in liquid-based systems involving stretchable materials.