When restoring a SQL Server backup, the users that are restored in the database are not the same as the users that were created at the server level, even though they may share the same name. This creates a problem with websites/users/etc that try and log into these databases. Because the accounts aren't the same, the login is rejected.
There are several ways to fix this problem.