Having one is essential because it can help you avoid going into debt if something unexpected happens. Some of the unexpected events that you might want to use an emergency fund for.
The last thing you need when trying to get back onto the solid ground is an even deeper debt hole. Emergency funds create a buffer that can keep you afloat without using credit cards or high-interest loans.
The general rule of thumb is to save enough money to cover three to six months of living expenses. However, the amount you'll need to save will depend on your circumstances.