Can you get rejected if you have an EU citizen family member…

Can you get rejected if you have an EU citizen family member residing in the country you wan to visit?

It can happen that the authorities can deny your entry to the EU state your family member resides in. This can happen because of public policy, public security or public health issues.