You do not need to cast a date to compare to a datetime. That is done implicitly, so CAST(GETDATE() AS DATE) -1 would work - or DATEADD(day, -1, CAST(GETDATE() AS DATE))
The usual recommendation is to use a combination of >= and < to get the data for a specific date range. For example, to get all records for yesterday,
table.date >= CAST(DATEADD(dd,-1,GETDATE() AS DATE)
AND table.date < CAST(GETDATE() AS DATE)
This will eliminate any issues that may arise when there is time portion in the table.date, as well as issues caused by precision of various datetime data types.
Using a specific data type -- such a date or datetime -- only works on later versions of SQL that specifically check for that in the optimizer.
Best when dealing with singular values / variables is to use format 'YYYYMMDD', which SQL will always implicitly convert to the column's format, regardless of SQL version. Converting a few values is trivial as far as overhead. You wouldn't want to do this for a table with millions of rows: