If it failed the emissions test they should have been able to give you guidance or some clues on the failure forms.
Is your check engine light on ? Have you had your O2 sensors replaced ? Have any emission components ever been removed ? When is the last time you had a tune up ? Have you ever had your injectors professionally cleaned?