Answer: Each has the first name of one U.S. president and the last name of another.
The Andy Griffith Show has Andy Taylor (Andrew Jackson + Zachary Taylor).
M*A*S*H has Benjamin Pierce (Benjamin Harrison + Franklin Pierce)
The Jeffersons has George Jefferson (George Washington + Thomas Jefferson)
Will & Grace has Will Truman (William McKinley + Harry Truman)