Generally speaking, a loan modification does not hurt an individual's credit score. Many people who undergo a loan modification do so because they are in some sort of financial distress. In many cases these individuals have defaulted on their mortgage payments, and possibly other debts. When someone falls behind on their mortgage payments or other debts they typically see a drop in their credit scores.
There are some loan modifications that reduce the principle balance an individual owes to a bank. There is a possibility, although unlikely, that the bank could report this reduction in balance to the credit bureaus. If that happens it is possible that could negatively impact your credit scores.
If you are experiencing financial distress and have defaulted on your mortgage, credit cards, auto loans, or any other financial obligation that reports on your credit report you may already be experiencing the impact on your credit score.
You may want to consider trying to refinance your home before trying to do a loan modification. If you can't refinance then you may want to consider the loan modification. I encourage you to speak with your lender and ask them if they report the modification to the credit bureaus. You can ask them if they do report it to the credit bureaus how that will impact your credit score.
The difficulty in answering your question stems from the fact that loan modifications are a relatively new mechanism to assist home owners. If you would like to know more about how credit work please see Understanding Your Credit Score.