The main dis-advantage of unlocking the bootloader of xperia ray is that it might void the warranty on some certain areas. And for the advantages after unlocking the xperia ray you will have full access to your phone root and also cann install custom rom on your xperia ray.
So, here is how to unlock the bootloader of xperia ray:
First of all, Some GSM phones cant be unlocked so you have to check that whether you can unlock your xperia ray or not. To check it you have to type these digits on you phone: *#*#7378423#*#*
After pressing a menu will show up. In this menu tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.
If your xperia ray is ready to be unlocked then congrats. you can follow this official sonymobile link and unlock xperia ray: