Installing SQL Server and Visual studio side-by-side
There is actually no official guide (AFAIK) for which one you should install first but based on my personal experience here is what I recommend:


If you are just installing the management components of SQL Server, such as Management Studio and the client libraries then I recommend always installing Visual Studio first followed by the SQL Server components. 
However, if you are installing the database engine itself then this should be installed first followed by Visual Studio (as SQL Server is the priority not VS).
Even when performing updates, ensure to update Visual Studio and then SQL Server.


This is because generally the components used by Visual Studio will be newer than those used by the build of SQL Server. I have found complications in the past when installing them side-by-side because sometimes they can be overwritten or updated by a Visual Studio install.

By installing Visual Studio and then SQL Server, any components that are required by SQL Server which have been updated by the Visual Studio installation are reinstalled by SQL Server itself.

That being said, with SSMS being a separate product Microsoft have been able to offer more frequent builds and problems are substantially reduced.