That depends on your relationship with your friend. If you are really close, you can directly try to tell him/her that it isn't a good idea - give them some evidence to suggest that the cult is bad (there should be a ton of evidence from former members if the cult really is bad). However, if you are that close to your friend, you should have seen the signs that he/she was going to join a cult, and it's a little too late to talk to them AFTER they've joined it.
If you are not REALLY close, then the best bet is to try to moderate their behaviour and enthusiasm towards the cult. Openly telling them "that group's a bad cult" is likely to illicit a hostile response. You've got to slowly, gently tell them that you disagree with their decision. Sometimes, the best thing to do is to do nothing and wait for the right opportunity.
The one thing you don't want to do, is charge in with criticisms and bash the cult. That will make your friend angry and they'll stop talking to you. It can be tough dealing with a loved one who has joined a cult, which is why you should be on the look-out for signs they are about to, so you can intervene BEFORE they actually join. Usually by the time they officially sign up for the cult, it's too late.