Observations and modelling of the hydrogen Lyman lines in solar flares