The European Union's top court ruled on Tuesday that companies may ban staff from wearing Islamic headscarves or other visible religious symbols.