This is a very opinion-based question, but I will try my best to answer in a manner that applies as generally as possible.
Anything you may think is valuable
Information Gathering is the first step in pentesting, but it doesn't mean that you only gather information once and then this is all you can work with. You always gather information about the system as you test it.
Sometimes, this is "formal" information, such as the technologies used (ASP.NET, PHP, Node.JS, etc.) or the versions thereof. Sometimes this is much more informal information, such as "These developers really didn't care about security at all".
This informal information is just as valuable, because it can clue you in as to what kinds of vulnerabilities the application may be vulnerable to.
Why do I collect information at all?
Because you need to know what kind of vulnerabilities are possible. If you test a web-application and you see that you can input some data, and it will be printed somewhere later, then you can immediately tell that you should test for Cross-Site Scripting.
If you know that some site you test uses the Wordpress Plugin "Live Chat Unlimited" in version 2.8.3, then it might give you some clues about what vulnerabilities it might have.
How do I collect information efficiently?
I won't make a list of tools you can use, because the tools of the trade change as new technologies emerge, and old technologies become obsolete. In general, it's a good idea to ask other more experienced pentesters questions like which tools they use for information gathering, and you will hear some tools over and over.
In general, I wouldn't get too hung up with tools at all. If you are just starting out, look at some vulnerabilities you have discovered in your tests, and what tipped you off that they might be there. Experience is the best teacher, after all.