Although it depends on the type of data, server etc.
I agree with r0ast3d.
According to me if server allows both the things, then I would prefer to use URLConnection.
Both sends data using streams, but wait mode in Socket is bit high than in URLConnection.
Please correct me If I am wrong.