I did it with my Sky router but can't remember exactly how I did it. I'd let a neighbours dc log into wifi at our house but then thought he'd be sitting outside using it and didn't really feel comfortable with the idea. Daft I know but they'd only recently moved in and hadn't set up for wifi at that time, I thought he'd have to log in everytime he came around but his iPad remembered us
Think I googled but ended up ringing Sky.
I had to pull my poker face when said neighbour turned up puzzled why he could no longer use our wifi.
Some routers also have Policies. That is a setting which can restrict access during certain times of day to certain devices.
What you can do depends on the router. If router provided by your ISP then they may have setup instructions on their website. Otherwise google the name and model of the router and see if there is a manual online.
First look on the router, see if it lists ip address and an admin username / password combo. Use that to log into the router (some routers may require that you are connected via ethernet, though many don't these days) then you may find a setting for wifi access code.