There are no rules on hyphens with prefixes. You have to know. But, there's good news. You can let your spell checker do the work for you. If you can, be consistent, but don't lose sleep over it.
Some style guides like to see a hyphen with double vowels, e.g. re-enter, but that's the closest thing to a grammar rule. It's spelling this one. Some words can be written with and without a hyphen, some demand the hyphen and others refuse the hyphen.