Part of my enlisted days were as a 702X0/732X0 specialist - and heavily involved in assignments.
The most desirable locations are most often given to seniority who list these locations on their dream sheet - ...especially if they did not get their preference on their last assignment or took a short tour unaccompanied to be in a better position to get a far better assignment next time... assuming all their personnel blocks are checked.
Officers who score well and present well and have great attributes are given points.
Something as simply as an official photo can make the difference.
The higher the academic achievement level the better the chances for assignment and promotion.
The most critical locations militarily are most often given to seniority and assuming all their personnel blocks are checked.
Junior officers with little or no experience are usually sent to locations where they can hone their skills and gain seniority as well as prove their merit - typically stateside.
Obviously, it is true to fill out a unit not all positions are for senior personnel - there may be room for junior grade officers simply because the manning document needs to be filled. (Somebody has to be the Squadron Commander, for instance...
)
Obviously, "timing" - needs of the service - often will allow the lucky to get into the better assignments.
Sometimes security clearance level will play a big part in the decision process.
Sometimes "short tour" vs "long tour" will play a part of the decision.
Overseas assignments are not usually given for a first assignment to either officers or airmen.
The most desirable overseas assignments are very competitive to be selected.
Sometimes married or single will play into a decision - especially for high cost locations.
Sometimes healthcare requirements for member or dependents will determine whether or not a preferred assignment is "right" for the family since availability for specific health services can be a requirement.
Command assignments will often decide priority on who gets what assignment.
Knowing somebody at the gaining organization willing to tweak the system helps just as much as knowing someone in assignments or who can influence assignments... Often the receiving organization commander (or his/her representative) has the prerogative to approve a newcomer - or not...
There are many variables.
Typically both airmen and officers prefer locations close to home.
Location choices can help or slow promotion potential.
Luck
P.S. I know many people who avoid HQ assignments - especially Washington D.C. like the plague - and often as not their careers stalled. If you are unaccompanied (or accompanied) and can afford to live in a high cost area (even as a Spartan), a D.C. assignment is a fantastic base for your career.
For specifics on each base text me if interested or simply google the base for much related information.