Making camp causes time to pass quickly, making it less tedious to recover HP and MP. Camping also allows you to use the Foraging skill to find reagents (contained in a sachet appearing right next to your camp when you finish camping), and the Repair skill to improve the condition of your equipment.
You must be a certain distance away from other creatures, whether hostile or NPCs, in order to make camp. Otherwise you will be "overcome by a sense of uneasiness" and conclude that resting in the area "is not a good idea".
While camping on some maps, there is a risk of being attacked. The enemies that may attack you vary by map. Some maps have no camp encounters and are safe to camp in indefinitely.