We consider the cosmological implications of the Weyl geometric gravity theory. The basic action of the model is obtained from the simplest conformally invariant gravitational action, constructed, in Weyl geometry, from the square of the Weyl scalar, the strength of the Weyl vector, and a matter term, respectively. The total action is linearized in the Weyl scalar by introducing an auxiliary scalar field. To maintain the conformal invariance of the action the trace condition is imposed on the matter energy–momentum tensor, thus making the matter sector of the action conformally invariant. The field equations are derived by varying the action with respect to the metric tensor, the Weyl vector field, and the scalar field, respectively. We investigate the cosmological implications of the theory, and we obtain first the cosmological evolution equations for a flat, homogeneous and isotropic geometry, described by Friedmann–Lemaitre–Robertson–Walker metric, which generalize the Friedmann equations of standard general relativity. In this context we consider two cosmological models, corresponding to the vacuum state, and to the presence of matter described by a linear barotropic equation of state. In both cases we perform a detailed comparison of the predictions of the theory with the cosmological observational data, and with the standard Λ\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\Lambda $$\\end{document} CDM model. By assuming that the presence of the Weyl geometric effects induce small perturbations in the homogeneous and isotropic cosmological background, and that the anisotropy parameter is small, the equations of the cosmological perturbations due to the presence of the Weyl geometric effects are derived. The time evolution of the metric and matter perturbations are explicitly obtained. Therefore, if Weyl geometric effects are present, the Universe would acquire some anisotropic characteristics, and its geometry will deviate from the standard FLRW one.