After an introduction summarising the current status of the standard cosmological model, this talk will present an effective description of dark energy and modified gravity models involving a single scalar field. It is based on a 3+1 splitting of space-time with respect to uniform scalar field hypersurfaces. The advantage of this approach is that it describes, in the same language, a vast number of existing models, such as quintessence, F(R) gravity, Horndeski theories. It also applies to the recent scalar-tensor theories ``beyond Horndeski'', which I will also discuss. In summary, this approach provides a unified treatment of linear cosmological perturbations, generically characterized by a few time-dependent functions. This gives an economic and systematic way to confront theoretical models with cosmological observations.