The OS X application firewall is not intended to prevent you from installing software, either intentionally or otherwise. Only you can do that, by authorizing its installation.
Merely clicking a link in an email that causes a scam webpage to load does nothing more than that. It will load just like any other webpage you might navigate to.
Some web pages will automatically start the download of some software you may not want, but even then nothing can happen unless you open and install that software. If you were to do that, OS X's Gatekeeper will provide the following dialog:

If that software wants to modify your Mac at a privileged level, you would see the following dialog:

That dialog box should never be a surprise. Only click the "Install Software" button if you are completely certain you want the software you are installing. Even then, you should have a plan for uninstalling that software in advance, in case it doesn't work or causes unexpected operation.
Provided you did not do any of those things, no other action is necessary, or justified.
The firewall's purpose is to block attempts from computers on the same network as yours from accessing ports used for various communication services. Learn about it here: OS X: About the application firewall - Apple Support. The firewall's default setting is "off".
Unless you use your Mac on a public Wi-Fi network shared by those you do not necessarily trust, don't worry about the firewall settings. Enabling the firewall will not prevent you from willfully divulging personal information, or from willfully installing software. People often confuse the application firewall with something that can protect against that threat, giving them a misplaced sense of security. That's not surprising, since the word "firewall" is an regrettably unfortunate choice of terminology for what it does. There is no fire and there is no wall.
Please read Effective defenses against malware and other threats.