Since the Java.net.Socket class doesn't implement Serializable, a Producer can't write it to Kafka for a Consumer to use. The reason why it's not Serializable is the same reason why you probably don't want to do this anyway: Once you have constructed a Socket, you really can't pass the object itself outside of a JVM and still be able to call the socket.
Having said that, you could write the arguments you use to construct a Socket (e.g. write a Kafka message that contains a host and a port) and then let the consumer construct its own socket with that information and then interact with the socket.