It is better to wait for a while, try to collect some new evidences, and then refile. If you file a new application immediately after the denial, it may not benefit you much. Of course the time schedule also depends on the specific reason that your case was denied.
If you have questions, please email me at: fsa2000@gmail.com