Teenagers who spend time cooped up in their bedrooms may be more prone to feeling threatened, research suggests.