Your sketch would have to set up the wifly as described in the wifly user manual and then the wifly will transmit data messages automatically to a remote host.
It is much easier to use a terminal emulator like TeraTerm to accomplish this (as described in the manual), rather than write a program to reproduce what you would type into the terminal program. Alternatively, you can telnet into the wifly (once it is connected to an access point) and set it up to send data messages. You only have to do the setup once, so it really doesn’t make much sense to write a program to do the setup.