Just use this. It works only for android api >= 11 before that you'll have to use a ClipData.
ClipboardManager _clipboard = (ClipboardManager) _activity.getSystemService(Context.CLIPBOARD_SERVICE);
_clipboard.setText(YOUR TEXT);
Hope it helped you :)
[UPDATE 3/19/2015]
Just like Ujjwal Singh said it the method setText
is deprecated now, you should use, just as the docs recommande it, setPrimaryClip(clipData)