SELECT CASE WHEN CAST(@In_Punch AS TIME,@Out_Punch AS TIME ) BETWEEN CAST ('08:00' AS TIME)
AND CAST('16:00' AS TIME) THEN 'P'
This is code you invented. It's not SQL. That's not how it works, you need to read up on what the right SQL is, not just make something up. You'd need to do this in several steps. First, is the in time between the two times, and then, is the out time between the two.
Also, if you must take a datetime and them turn it in to a time, do it once. Do it once for the times you use to check as well, not over and over again. This makes your code more efficient and more readable.
declare @eightAM as time = cast('08:00' as time)
declare @fourPM as time = cast('16:00' as time)
declare @timein as time = cast(@In_punch as time)
declare @timeout as time = cast(@Out_punch as time)
select case when @timein >= @eightAM and @timeOut <= @timeout and @timein < @timeOut then 'P'
and so on. Note I am doing less checks than you. My code checks the same thing, but is more readable.