I think it's illegal but sometimes it's become legal in way of protecting of our children.It's parents duty to know the activities of their children if they wants to go wrong side so it's parents right to secure their kids from any harms or vegetative aspects of life.
It's your dad's responsibility to aware your activity he wants to protect you from any dangers that you don't know. He has also right to know your friends circle.May be he can use cell phone tracker to know all your activities which you done with your friends.