It's used to say that someone should or must do something.

Shut up boy, you're to sit in the corner and keep quiet.

Their mother said they were not to play near the river.

what are we to, mom? (What should we do, mum?)