We derive universal lower bounds for the potential energy of spherical codes, that are optimal in the framework of Delsarte-Yudin linear programming method. Our bounds are universal in the sense of both Levenshtein and Cohn-Kumar; i.e., they are valid for any choice of dimension and code cardinality and they apply to any absolutely monotone potential. We further discuss a characterization on when the lower bounds are LP-optimal, that is they are the best possible in terms of the linear programming approach. Finally, we present the analogous results for codes in projective spaces