Keeping a safe distance between you and other drivers creates a safe driving environment for you and others on the road. Being too close to other cars causes you to not be able to scan the road and cause an incident that could harm many.
There is a main rule to follow when considering how close you need to be to others on the road, The Three-Second Rule:
If you have passed the landmark before you have finished counting, you are following too closely and need to slow down. If there are hazardous conditions such as:
With any of these, with exception of the tailgating, need to have another second added when basing them off of the landmark you have chosen.