They have different base stats(ill give those in a few seconds in the edit). They also have different roles in the pokemon world as you should know. You know the willpower,knowledge etc. thats really the main differences.
Edit: okay mesprit is more of a mix pokemon between both attack stats and defense stats(meaning hes equal in all four attack and special attack and defense and special defense)
azelf is more based on the attack stats (attack and special attack)
Uxie is more based on the defense stats(defense and special defense)