From a constitutional standpoint, there is no difference between a commonwealth and a state. The only distinction is in the name. A commonwealth like a state is the entire body of ‘people’ organized under one government. We are citizens of the United States of America, and residents of the state where we reside.
Massachusetts is a commonwealth because it is contained in their Constitution (1780). It states: "that the people ... form themselves into a free, sovereign, and independent body politic, or state by the name of The Commonwealth of Massachusetts." Three other states adopted a Constitution that called their respective state, commonwealth: The Commonwealth of Virginia (1776), The Commonwealth of Kentucky (3rd Constitution 1850), and The Commonwealth of Pennsylvania (1776).
As far as Kentucky, Massachusetts, and Virginia, they were center of the Revolution against the British, and when they broke away from the Union, they took the name commonwealth to show they were a different government. Thereby, the framers used the term to refer to government in their respective Constitution.