Steps to fix the problem are as follows:
Stop the vFoglight Collector and Connector services.
Open command prompt and go to the VmWare Agent directory where the agent is installed.
Run the below command
FoglightAgent.WinService.exe /configure
Change the Virtual Center User Account credentials.
Save it.
Start the Collector and Connector services.
Wait for 2 to 5 minutes and then login to vFoglight and then you will see data for VmWare.