You have to legally change your name anytime a social security number is needed. My sister got away without that for a while, until she applied for her passport. She was very upset it didn’t match much of her other information, and I personally know the RMV/DMV crosschecks your name with SS.
Like @Randy said, you need to start in the local court. In MA, if you go to Family and Probate of your local courthouse, they will give you an application to fill out and you will give them an application fee. You have XX amount of time to print the fact that you are changing your name in the paper (an added expense) then you have a court date. If no one shows up in protest, your name is legally changed that day. If you are underage, you need permission from both parents.
There are other ways of changing it legally, such as getting married or being adopted, where you have a traditional choice (significant other’s last name) or can choose your own (mother’s maiden name). Not that you should get married on the basis of a name change!