Do they need to be friends, group, wing or squadron etc. and do I need shipyard or outfitting? I can't seem to find any links to cover this subject.
No, no need for you to be friends or in the same squadron - however, you can set docking permission based on your friends list or squadron or all or none.
If you dont want to open your FC for all (why wouldnt you, unless you want to setup some sell orders that only your guests can access -- for example you want to sell tritium so they can refuel your carrier when you are not online - but this is really a niche case)
You dont need shipyard or outfitting if they only bring a single ship each and they dont plan to change builds during expedition - but you definitely need refuel repair and armoury for maintenance.
And you also need UC and VIsta Genomics so you and them can sell exploration data and exobiology
You may also want the Bar Concourse for a friendlier on-foot social area
However, if they want to bring multiple ships (an explorer and a miner for example or a small ship for exobio) - you definitely need the shipyard, and if you want them to be able to swap a module here and there, you also need outfitting