If you have a connectionstring in a web.config which you are trying to replace such as <connectionStrings>
<add name="SiteSqlServer" connectionString="Server=(local);Database=applicaition;uid=;pwd=;" providerName="System.Data.SqlClient" />
</connectionStrings>
then you can run your sync command as:
msdeploy -verb:sync -source:iisApp="Default web site/MyApp" -dest:auto,computername=destination -setParam:type=XmlFile,scope=\\web.config$,match=//connectionStrings/add/@connectionString,value="newconnectionstring"
All you are specifying is that you are trying to replace a value in an XML file which has to end in the name web.config and for specifying the location of replacement you are providing an xpath. You can read more about setParam here