I am developing an application which writes some JSON data in a text file:
fOut = openFileOutput("myfile.txt", MODE_PRIVATE);
OutputStreamWriter osw = new OutputStreamWriter(fOut);
Plugging it into your computer is mounting it to the SD card, usually. To save to that, get the SD card root directory File with
Environment.getExternalStorageDirectory() and then construct a new File with that File and your desired string filename as the arguments. That will save it to your SD card which should be the first folder you see when you mount it on your computer.
By the way, for writing text/JSON straight to a file, just use FileWriter.