VB-groupoids are vector bundles in the category of Lie groupoids. They encompass several classical objects, including Lie group representations and 2-vector spaces. Moreover, they provide geometric pictures for 2-term representations up to homotopy of Lie groupoids. We attach to every VB-groupoid a cochain complex controlling its deformations and discuss its fundamental features, such as Morita invariance and a van Est theorem. Several examples and applications are given.