The solution is pretty simple:
http://www.kf7.co.uk/sql-server-principal-not-able-access-database.aspx
SQL Server Management Studio uses sql script to get a list of databases and related information. If you do not have enough rights to retrieve the related pieces of information then you may get this error.