In all cases of diagnosing any injury or condition you have to
1. listen to the patients presenting symptoms and history and after come up with a checklist of the top 5-6 things they COULD have
2. Through a series of orthopedic/neurological/provocative testing eliminate conditions one at a time
for Piriformis Syndrome the top 5 things it COULD be are
1. Sciatica (probably the most often confused with)
3. Gluteus Medius Syndrome ( also called “Runners Butt”) this is often misdiagnosed as sciatica or Piriformis Syndrome
there are other conditions to eliminate such as the SI joint but so that you understand the logical thought process.
Sciatica is a result of a swollen or protruded/herniated disc that puts pressure on the L5-S1 nerve root resulting in radiating pain and/or numbness down the leg into the foot in a very recognizable pattern.  Piriformis Syndrome has the same set of symptoms but results from compression of the same nerve by the Piriformis Muscle(s).
Gluteus Medius Syndrome does not radiate down the leg into the foot but is mostly localized pain in the Gluteal region sometimes accompanied by hamstring spasm called muscle splinting.
High Hamstring Tear or Tendonosis gets hamstring muscle splinting and causes pain sitting, walking especially uphill and running especially fast.  Ischial Bursitis is very similar but the two can be distinguished by a manual hamstring muscle test typically.
If necessary and MRI is ordered as X-rays are useless in these cases.  The MRI is used to CONFIRM what the orthopedic/neurological/provocative testing PREDICTED.
So basically using logic, deductive diagnostics, common sense and years of experience you can usually narrow down the diagnosis even without MRI but if there is any doubt the MRI can be used to help confirm.
Once the diagnosis is made treatment strategies are offered.  One of the most important things as far as treatment is concerned is to eliminate any offending variables.  If it hurts to sit a stand up desk is prescribed.  If it hurts to run then running must be stopped for awhile etc
Also is it crucial that the patient is educated on the condition and given home strategies/rehab to do on their own. For example in the case of Piriformis Syndrome patients are instructed to perform 2 stretches every WAKING hour and hold each stretch for 30 seconds.  They are also instructed on how to properly use a foam roller massager for 2-3 minutes 2x daily.  Of course there may be 100 other things they could do but if given too many exercises to do it becomes cumbersome so they stop doing it all together.  My job is to identify the BEST 2-3 interventions and teach them how important it is to do it consistently. This is important because if the exercises are going to work they must be done properly.
The problem is MOST (not all) MD’s just want to give you 5-7 minutes then prescribe you painkillers, muscle relaxants and/or antiinflammatory drugs
MOST (not all) Chiropractors just want you to come in 2-3 x a week and crack your SI joints and tell you your hip is rotated
MOST (not all) Physical Therapists want to strengthen your weak glutes 
Most (not all) Massage Therapists want to put their elbow into your Piriformis.  They think if they beat on your Piriformis hard enough it will “submit”
MOST (not all) Surgeons want to operate on your lower back and fuse it or your SI joint
The old saying is “If the only tool in your box is a hammer every problem you see is a nail”.  This applies to the world of medicine.  Very few doctors take the time to accurately diagnose.  In fact according to the research at Harvard medical school 92% of primary doctors are incompetent in musculoskeletal diagnosis.  That is a scary stat!