One of the frustrating problems that you might face while developing SharePoint applications is some of the errors that you really don’t know how to troubleshoot, or where to start your investigation, one of the errors I had is the following:
Error occurred in deployment step ‘Recycle IIS Application Pool’: Cannot connect to the SharePoint site: << Site Collection URL >>. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.
The solution here is that the user deploying using visual studio to have db_owner permission on the content database for the web application.