If you qualify for United States citizenship and decide to apply, the first form you must fill out is N-400, application for naturalization. It is important to wait until you meet all criteria for citizenship to apply. One of the questions in Part I of the form is whether you wish to change your name at the time of naturalization. If so, you must enter both your current legal name and your desired name on the appropriate lines on the form.
Congress does not authorize the USCIS to make legal name changes during the naturalization process, but if your swearing-in ceremony is conducted by a judge, she has authority to order a name change. Because many courts opt out of the naturalization ceremony and authorize USCIS personnel to administer the oath, to have your name changed as part of the ceremony, you must be sworn in as a citizen in a judicial ceremony presided over by a judge. Generally, applicants opting for a name change are assigned to judicial ceremonies. It's important to confirm that a judge will be presiding when you are notified of the time and place for naturalization oath ceremonies, if you are counting on changing your name at that time.
If you legally changed your name before the naturalization ceremony, you can ask that your naturalization certificate be issued in your new name. If you are married and have been using your husband's last name, the marriage certificate is sufficient proof that your last name has changed. Similarly, if you were recently divorced and the divorce order restored your original name, a divorce certificate is sufficient proof of your new name. Otherwise, you must file a name change petition with a state court where you reside well before the naturalization ceremony.
If you do not manage to change your name before or at the time you are naturalized, once you are sworn in you have the same range of legal options to change your name as are available to other U.S. citizens. State procedures vary, but most involve filling out a petition for a name change, paying a filing fee, giving some type of public notice like publication and attending a hearing. You are responsible for notifying the USCIS of your new name so it can issue a new Certificate of Citizenship.