Yes binary options are legal in most jurisdictions as long as they are offered by a licensed broker. The rules for licensing varies from country to country. Some countries require the broker to have a national license while other accept licenses from other countries.
A broker that has a license from one of the countries within the European union can legally offer their service in all EU Nations. This is the reason that many brokers use a license from Malta or from Cysec on Cyprus.
Binary options are often regulated by the security commission but there are many countries that lacks regulation governing the trade of binary options. Other countries requires the brokers to have a license from their gambling commission instead of their security commission. An example of this is the UK where brokers like IG often have a license from UK Gambling Commission. This is due to the fact that binary options in many ways are more similar to a game of chance than a financial instruments. It is also partly due to the fact that binary options where invented as a casino game offered in online casinos. It is now rare that casinos offer binary options.