When you start to calculate your fence post spacing you will find that it will be based on two factors: fence type and security.
Each fence type has a different recommended spacing for its posts. Large wooden privacy fences have the tightest spacing. In order to provide maximum privacy this fence type will need tightly spaced posts to block prying eyes. It also needs the extra posts to bear up under the weight of the wood and to stay rigid against the wind, since the tighter the spacing of your fence, the more surface area that the wind will have to push against. Split rail fences have the longest post spacing and an open design. They are primarily used to mark boundaries so they do not need as much structural integrity as other fence types.
The security of the fence will depend on its post spacing, especially if it is a wood fence. A chain link fence is stronger when more posts are used but since it has the chain link mesh between the posts, they do not actually add to the security. If you are building a picket fence to encircle your home, the spacing will make a big difference. When built for aesthetic reasons, you can have a fairly wide spacing between the posts and slats. If you have small children or pets, then you will want the posts and slats very tightly spaced to prevent them from getting out of your yard.