I normally see this issue when connect permission is removed/revoked from the database
USE DatabaseName GO GRANT CONNECT TO LoginName
You can check which users in a database have the CONNECT permission by executing this T-SQL:
USE DatabaseName GO SELECT name, hasdbaccess FROM sys.sysusers WHERE name = 'LoginName'