An analysis of H alpha and H beta spectra in a sample of 30 cool dwarf and subgiant stars is presented using MARCS model atmospheres based on the most recent calculations of the line opacities. A detailed quantitative comparison of the solar flux spectra with model spectra shows that Balmer line profile shapes, and therefore the temperature structure in the line formation region, are best represented under the mixing length theory by any combination of a low mixing-length parameter alpha and a low convective structure parameter y. A slightly lower effective temperature is obtained for the sun than the accepted value, which we attribute to errors in models and line opacities. The programme stars span temperatures from 4800 to 7100 K and include a small number of population II stars. Effective temperatures have been derived using a quantitative fitting method with a detailed error analysis. Our temperatures find good agreement with those from the Infrared Flux Method (IRFM) near solar metallicity but show differences at low metallicity where the two available IRFM determinations themselves are in disagreement. Comparison with recent temperature determinations using Balmer lines by Fuhrmann (1998, 2000), who employed a different description of the wing absorption due to self-broadening, does not show the large differences predicted by Barklem et al. (2000). In fact, perhaps fortuitously, reasonable agreement is found near solar metallicity, while we find significantly cooler temperatures for low metallicity stars of around solar temperature.