You can use or analyse code of below free module to change attribute set of a product :
http://www.magentocommerce.com/magento-connect/flagbit-change-attribute-set.html
The code I found from module which can change attribute set :
This code is located in /app/code/community/Flagbit/ChangeAttributeSet/controllers/Adminhtml/Catalog/ProductController.php
foreach ($productIds as $productId) {
$product = Mage::getSingleton('catalog/product')
->unsetData()
->setStoreId($storeId)
->load($productId)
->setAttributeSetId($attributeSetId)
->setIsMassupdate(true)
->save();
}
You should pass below to this code :
- product ids ($productIds)
- store id ($storeId)
- attribute set id ($attributeSetId)