The pH of a substance can affect its toxicity by altering its ionization state. Ionized forms of chemicals are often less lipophilic, reducing their ability to cross cell membranes. Conversely, non-ionized forms are more lipid-soluble and can easily penetrate tissues, increasing toxicity. The pKa value of a substance can predict its ionization state at a given pH, which is crucial for understanding its toxicological profile.