Disable Screen sharing via the command line in mountain lion
To start screensharing:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist


To stop:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist


The -w flag modifies the Disabled key as appropriate. It's best to let launchctl handle this, as the location where the config files are stored has changed a bit between OS versions.