There are various installation requirements for different types of water heaters (tank, tankless) and they might vary between jurisdictions.
California adopted Uniform Plumbing Code but this doesn’t mean that your local building department has no additional rules that apply to water heater installation on the exterior / sidewall of the house.
I checked 3 California cities (Concord, Berkeley, and Alameda / links to their WH installation rquirements are below) and there’s nothing in their requirement lists that would prevent placing it on the side of the house. The only referral to the water heater’s outdoor installation is that the appliance “shall be protected to the degree that the outdoor environment requires unless it is listed for outdoor installation”.
Other things that could prevent water heater installation on the side wall of the house could be clearances / distances from the windows, doors, air intake vents, distance to the roof overhang, distance to the property line and neighbors building , etc.
Furthermore, the water heater must be installed so it is not subject to physical damage, for example, by moving vehicles (if you have a driveway along the side wall of your house), area flooding, etc. There is also a minimum of 24” of space recommended in front of the water heater for servicing purposes.
The best source for providing this particular water heater installation answer would be your local building department. Maybe you can locate those requirements on their website.