I get the quesiton of how to switch the service account for MOSS and WSS 3.0 fairly often.
There are many reasons why one would want to change the account or the password to the account used for SharePoint. Microsoft has now put up a KB article on exactly how to do it. They even included a sample script!
Check out the KB article here: How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0