I am not sure the responses so far address what the OP really wants to achieve.
Perhaps the OP may want to better explain what he actually wants to achieve.
In order to connect a toy ( what size are we talking about ? ) to a WiFi network you wound not need to "program" the SSID and WPA key into the Arduino. What you have to do is to configure the Arduino side of the WiFi connection with these parameters. That does not really per se require you to connect the device to a computer Via USB, and compile/ upload the hex co to the Arduino, even though that could probably be one way, alas thats rather complicated!
A more common way would assume that the toy comes with a builtin WiFi "device" that, similar to many pocket WiFi routers, comes configured as its own Access Point (AP). You'd power the toy up and then connect to the Toy-WiFi device via Internet browser. The Toy-WiFi device then would serve a web page to allow configuring the WiFi connection to connect to the Users Home network and ultimately to the Users computer.
The next question is, once you have established a WiFi connection, what do you want to do with it ?
That may determine what protocol is best for what you want to do, TCP, UDP ?
Do you also want to access it from mobile devices ?