Traditionally, the term "commonwealth" was considered synonymous with "republic." When Virginia, Massachusetts, and Pennsylvania became independent from Britain, they chose to call themselves "commonwealths" to distinguish themselves from monarchies. They were probably imitating the Commonwealth of England, which was established after the English Civil War.
However, the term "commonwealth" does not have any special political meaning. Some commonwealths are states (e.g., the Commonwealth of Virginia), but others are territories (e.g., the Commonwealth of Puerto Rico).
Kentucky is also a commonwealth.