The 25-year-old has signed a two-year deal at the Stadium of Light after four seasons on the Posh books.
Black Cats boss Jack Ross has already signed several defensive players in Tom Flanagan, Alim Ozturk, Reece James and Glenn Loovens, and admitted that he was now "comfortable" with the backline players at his disposal.
"Everybody knew we were looking to strengthen again in this area of the pitch and now we're comfortable with where we're at in terms of central defensive options," Ross told the club's website.
"Jack is proven in this league and he's at a good age with his best years ahead of him, and he has a hunger to improve and do well.
"He sees this as a big opportunity and has the core attributes we have been looking for."
Baldwin started his career at Hartlepool United before a move to Peterborough in 2014, where he went on to make 116 appearances.