We highly recommend that you stay within the ancient walled city rather than the outside, the two are very different (old vs new). However, inside the walls you will only find hostels and guest houses, whereas hotels can only be found on the outside.
We pre-booked out accommodation at Zhengjia International Youth Hostel (http://www.hostelbookers.com/hostels/china/pingyao/19532/) but you could quite easily just show up and ask for a room at any of the hostels/ guesthouses (this may be different in peak season). The town was quite busy during the day as most people just visit Pingyao on a day trip rather than stay over night.
A bed in a dorm of 4 people at our hostel cost us 35RMB/ AU$7 p/p p/n. Breakfast was 10RMB (AU$2) and was traditional Chinese breakfast (soup, pickled vegetables, boiled eggs and bread)