The sequence is safe to key-in on T-Mobile and Cingular (and other GSM) phones and Blackberries. It displays on the phone screen the IMEI (serial number) of the phone.
You can achieve the same result by checking the serial number printed on the back of the phone or the box it came in.
On other carriers I am not sure, but I believe it does nothing.
"You can achieve the same result by checking the serial number printed on the back of the phone"
Yep, it's there. But it's not as sexy as punching in a code to view it.