What is more appropriate to say: It was nice being here or It was nice to be here? I hear both constructions pretty often, and am aware of the slight difference, but it seems that people use them interchangeably.
Both are alternatives with the same semantic meaning. The first says that "being here" (gerund) was nice. The second says that "to be here" (infinitival) was nice. Both can mean either of the following depending on the context (conveyed partly through tone and emphasis):
I enjoyed my stay here.
I used to enjoy being here.
The interchangeability of the gerund and to-infinitive can be found in many places:
But when as an object of a verb, usually only the gerund can be used:
I love to read. = I love reading.
I enjoy reading. (NOT I enjoy to read.)
You should practise writing. (NOT You should practise to write.)
This makes travelling easy. (NOT This makes to travel easy.)
As a side note, the following are not examples of the to-infinitive:
He agreed to come. ("agree to" is a phrasal verb just like "agree with")
Allow him to go. ("allow to" is a phrasal verb; compare with "let him go")