Can encephalitis be transmitted by a mosquito who has bitten someone with herpes?

No. Herpes is transmitted by direct contact, usually with an infected person's open sores. Herpes is not transmitted by mosquitoes. Herpes encephalitis is quite rare. Hypothetically, if a mosquito bit a critically ill person with disseminated (total body) herpes, and then immediately bite a never-infected person (has no antibodies), he might get herpes at the bite site, but encephalitis would be rare.