Can a professor tell you that you can’t use your phone before or after their class? So, I have this one professor who refuses to let anyone use their phone. I understand this during class hours but now he’s saying he will give a demerit to anyone using their phone even if it’s before or after class. 

I personally am at the school from 9 a.m. to 9 p.m. and his class is my last one for the day and I have a 2 1/2 hour wait until it starts. Most days I get into his class room anywhere from 30 mins to almost an hour before class starts. The teacher is in the room as students aren’t allowed in otherwise. In that time I’m generally on my phone as in my opinion it’s my free time and I’d like something to do or have people I’m talking to over text. 

Everyone is of course adults as we are in college so it’s extremely irritating that another adult would tell me and other students to put a phone away when there is literally no one else in the classroom and no work is being done. Even after class he threatens to write me up for having my phone out whether it’s just to check the time or look something up. (I’m usually the last to leave as I don’t feel the need to rush out of the room and generally try to clean up pretty well before I go) 

Maybe I’m just being unreasonable but I do believe some boundaries of respect are being crossed. I don’t talk back or stand up for myself when he tells me to put it away either as I grew up being taught to respect anyone in authority or older than you. Though, he’s the first to make this difficult as the respect doesn’t feel as though it’s being reciprocated.
I think your description of what’s going on is misleading. The professor is not “telling you you can’t use your phone before class”. He’s telling you you can’t use your phone before class in the classroom when he’s also in the classroom.

Is that reasonable? I honestly don’t have a strong opinion. I can certainly see why it’s annoying to you on the one hand, but can also see things from the professor’s perspective - if he wants to use those thirty minutes before class to review the material he’ll be discussing, and is easily distracted by phones (yes, professors are prone to distraction just like other people), he may well think his need to have a distraction-free working environment so that he can deliver good instruction for his class overrides your personal need to use your phone during that time and makes it okay for him to decide what is and isn’t allowed in the classroom, even though the official lecture time hasn’t yet arrived.

It’s possible you can win this on a technicality by turning this into some kind of principled fight over individual rights. But I don’t see a point, it wouldn’t be a real “win” for you or anyone else in any meaningful sense. Your professor may be a slightly unreasonable person with a slightly rigid personality, but in my opinion the mature thing to do in this situation would be to respect his wishes and find some other place to use your phone before class.