optionVars are stored in MEL files. The entries are just key/value pairs. The are saved when Maya closes (usually), but you can force them to be saved by doing File->Save Preferences (or in code).
The recent files list (key is ‘RecentFilesList’) entry is stored in the:
C:/users/name/Documents/maya/2013-x64/prefs/userPrefs.mel file
To get a list the recent files, you can do:
import maya.cmds as cmds
cmds.optionVar(query='RecentFilesList')
To save a list of files, you can do something like:
import maya.cmds as cmds
cmds.optionVar(stringValueAppend=('RecentFilesList', 'path/to/recent/file/you/want/to/add.ma'))
The other MEL files where preferences are saved (you can see this in the script editor output if you do File->Save Preferences):
// Saving preferences to : C:/Users/name/Documents/maya/2013-x64/prefs/userPrefs.mel //
// Saving window positions to : C:/Users/name/Documents/maya/2013-x64/prefs/windowPrefs.mel //
// Saving runtime commands to : C:/Users/name/Documents/maya/2013-x64/prefs/userRunTimeCommands.mel //
// Saving hotkeys to : C:/Users/name/Documents/maya/2013-x64/prefs/userHotkeys.mel //
// Saving named commands to : C:/Users/name/Documents/maya/2013-x64/prefs/userNamedCommands.mel //
// Saving plug-in preferences to: C:/Users/name/Documents/maya/2013-x64/prefs/pluginPrefs.mel //
// Preferences saved. See Script Editor for details. //
Phil