The ionization of polycyclic aromatic hydocarbons (PAHs) by ultraviolet (UV) photons from massive stars is expected to account for a large fraction of the heating of neutral gas in galaxies. Evaluation of this proposal, however, has been limited by our ability to directly compare observational diagnostics to the results of a molecular model describing PAH ionization. The objective of this article is to take advantage of the most recent values of molecular parameters derived from laboratory experiments and quantum chemical calculations on PAHs and provide a detailed comparison between modeled values and observational diagnostics for the PAH charge state and the heating efficiency for PAHs. Despite the use of a simple analytical model, we obtain a good agreement between model results and observational diagnostics over a wide range of radiation fields and physical conditions, in environments such as star-forming regions, galaxies, and protoplanetary disks. In addition, we found that the modeled photoelectric heating rates by PAHs are close to the observed cooling rates given by the gas emission. These results show that PAH ionization is the main source of neutral gas heating in these environments. The results of our photoelectric heating model by PAHs can thus be used to assess the contribution of UV radiative heating in galaxies (vs. e.g. shock). We conclude on the importance of implementing the physics of PAH ionization in astrophysical codes, which are developed, for example, for the evaporating surfaces of protoplanetary disks, the diffuse interstellar medium, and the photodissociation regions associated with star-forming regions in the local and distant universe. We provide the empirical formulas and Python code to calculate the heating rates and heating efficiencies for PAHs.