Accommodation
Edinburgh has a good range of most types of accommodation, but all are best book well in advance, particularly at peak times.
If you can try to reserve at least three (ideally six) months in advance for the August festival season or the Hogmanay New Year's celebrations.
Location
It's not essential to stay in the very centre of Edinburgh, which is relatively compact, easily walkable (despite some steep gradients), and well-served by buses. So don't agonize over which neighborhood to choose.
Certainly if nightlife is important to you, then lodgings in either The Old Town or The New Town will be best. Conversely avoid these if you're a light sleeper.
With an early flight to catch consider staying in The West End around Haymarket which is central enough and on the ride side of town for the airport to which it's well connected by frequent by trams and buses.
Prices