Like most things in life, the answer is "depends" :-)
Sacramento is the capital of Ca, and is a larger city than Davis, which is a small University-farming town. Hence Sacramento has more choices and a larger range of hotels compared to Davis, and they overlap in prices and hotel classes. I suggest as a start, you look up the hotels on sites like Kayak, Orbitz, Expedia, Hotels.com - any one of these sites should give you a range of prices to expect. I also found sites like Tripadvisor or Fodors to give good "on-the ground" recommendations of where to stay, things to do, etc. Also, please note prices change due to supply and demand - I suspect that prices in Davis might be higher around the graduation time and incoming school year as UC Davis is there, and for Sacramento, who knows - maybe when the legislature is in session...but given Sacramento is much bigger, I think prices might be more stable throughout the year - point is, that is another factor to consider!
I assume you have to be in the vicinity of these towns and that's why you are asking about them specifically. Otherwise, in case you missed it, they are quite far from the typical tourist areas, even by car. I ask because you indicated you would like to visit Ca.
In any case, welcome to Ca in advance!