Does the android platform have any firewall application?
I'm pretty sure that Android includes iptables, which is the standard firewall for any Linux. What I have no information about is whether iptables is compiled into the kernel used on all phones, but you might get more information out of this thread in the xda-developers forum.
DroidWall is pretty good, but it requires root, of course.
It allows you to control on an app-by-app basis which applications can access the network, and has separate permissions for Wifi and 3g.
As per @TREE's answer above - DroidWall is no longer developed nor supported and is forked into a superior version called AFWall found on Github.
For those who do not wish to tinker with the code, here's the direct linky to the Play Store
AFWall works very well with the newer Ice Cream Sandwich and upwards.
And yes it has the same requirement as the old DroidWall, i.e. requiring root.