The su command starts another shell as root (or whomever if you supply a username and correct password). This shell gets all the normal environment variables, which of course includes the HTTP_PROXY and FTP_PROXY variables. Thus it works.
The sudo command REMOVES ALL environment variables except for a specifically chosen subset... which of course does NOT include the HTTP_PROXY & FTP_PROXY variables, thus your commands fail.
You can make sudo keep the *_PROXY variables by editing the sudoers config file, using the visudo command (of course).
Adding the following will make sudo keep the values of HTTP_PROXY & FTP_PROXY:
Defaults env_keep += "http_proxy ftp_proxy https_proxy HTTP_PROXY FTP_PROXY HTTPS_PROXY"
Coincidentally, if you add DISPLAY & HOME to that list, you can use gui programs with sudo too (they need the DISPLAY variable to connect)
Defaults env_keep += "DISPLAY HOME"
You can even just add those two lines, like that. (The += is the key here) Remember to add these lines towards the end of the file, since in the first few lines it usually sets the '*env_keep*' variable with a straight '=', which erases any previous value.