Here is one explanation
During the Civil War around 1648 Oliver Cromwell imprisoned many Charles I Royalists. The soldiers were completely ostracised by the strongly parliamentarian Coventry folk. Since then, people who have been shunned in that way are said to have been "sent to Coventry". There are other theories of where this saying came from such as Coventry was once a place used to carry out executions - or - after the Civil War Coventry folks were so anti-military that they forbid anyone to socialize with any soldiers that were posted there. Therefore the soldiers didn't like to be "sent to Coventry".