No any company is good or bad. You can join any one of Infosys or Cognizent.
But for better future aspects i would like to suggest you to join Infosys.Because, if you are interested to get good knowledge with some pressure and good salary pacakege. Then Infosys is the best company for you.But, If you want to earn more money and dont want to get knowledge and pressure, then i will suggest you, just join Cognizant. So, if you want to get more knowledge, then please join Infosys. Because after joining this company, you will definatelty gain a great knowledge.The career opportunities as well as learning environment in Infosys is far better than Cognizant.So, the choice is yours. Just choose according to your interest.
all the best!!