Observations and modelling of the chromosphere during solar flares