It depends. If you are planning on purchasing a Gold Membership Code to have remote access to XBOX LIVE, then you can get the code from anywhere around the world. However if you are in need of Microsoft Points, then you have some problems.
UK Microsoft Point Codes can only be used in the United Kingdom and Ireland. Therefore, if you live in other European countries (Latvia, Russia, Spain, France, etc.) you will not be able to redeem UK Microsoft Point Codes, only EU Microsoft Point Codes. However, there still might be hope.
According to Wikipedia, 4000 Microsoft Point Codes are the sole exception. You can purchase 4000 Microsoft Point Codes from anywhere around the world and you will still be able to redeem them. Although, keep in mind that Wikipedia isn't such a reliable source.