Let's get it straight, your first pair of sentences is a complete mess!
- It was the first time to meet you.
- It was the first time meeting you.
Neither the option with the to-infinitive nor the option with the gerund really work here since the sentences are illogical and ungrammatical.
"the first time to+verb" is plain wrong (bad English) whether in the past or the present, or the future.
However, there seems to exist a construction "the first time to+subject" as in "It was the first time to Jupiter. We didn't know what awaited us there.". Guessing the meaning here is "visit/journey/trip/travel". However, as most sources say we need a possessive adjective with "first time". So your correct two sentences should be:
- It was my first time to meet you.
- It was my first time meeting you.
Notice, that the to-infinitive is stiffly formal. And by what I know the first sentence means "something that was about to happen" while the second one means "something that happened". However, in casual speech it's usually:
- It was the first time we met.
- It was my first time when I met you.
With the second pair the difference is vague but grammatically interpreted.
- What is it like to have a child?
- What is it like having a child?
According to Cambridge Dictionary - "Verb patterns: verb + infinitive or verb + -ing" some verbs can be followed by either a to-infinitive or -ing the "difference in meaning is often small" (quote from the reference):
However, here we can see a question form ("What is... like") which we use when we are enquiring about experience. With this question form either the to-infinitive or the -ing will both mean the same thing. Although we could interpret them as with the verb "like":
- The -ing form emphasises the verb itself. (Implies enjoyment and liking)
- The to-infinitive expresses habitual preference, something that we do not necessarily like or enjoy but consider as useful, right or wise.
Based on this information we get:
- What is it like to have a child? (A general question of possession) - How does having a child change you and your life? This doesn't necessarily imply being pleased with having a child.
- What is it like having a child? (A question of pleasure and satisfaction) - What does one feel when he has a child? What emotions does one have? This implies being happy and enjoying the fact that you have a child.
To my own knowledge the -ing form usually conveys the idea of wanting to get into somebodies skin. To experience what they experience!
- What is it like to be a student? - You are asking about general knowledge and the idea.
- What is it like being a student? - You dire to become one. You want to know what it feels like to be one. You may as well be asking for personal experience.