How much can someone see from my iPhone by connecting to my wifi and can they copy my messages files documents etc
If you are transmitting anything through WiFi then an eavesdropper can capture all the transmitted packets and analyze the data. Thus, anything you transmit should be encrypted (using TLS preferbly).
And dont rely much on the WiFi encryption as most of the time (other than WPA2 enterprise), as it can be cracked by someone who knows the pre-shared key and recorded the handshake.
Otherwise, if there is an app that allows remote access or file sharing then someone may be able to hack into your phone. Especially if your iPhone is jailbroken, then 1 out of 20 iPhones/iPads can be hacked in less than a minute.
And lastly viruses, trojans and malware can also intrude on your privacy once you are connected to the Internet. Again, this happens only if your phone is jailbroken. Because according to here, there are no known iOS viruses that can infect an iPad or iPhone that has not been jailbroken.
Because iOS implements something called sandboxing, which restricted the resources that each app can use. So, a malicious app will have a hard time accessing data stored in other apps unless it is jailbroken.