When one party in a court case believes the facts of the case are so clear and conclusive that there's no work for a jury to do, they motion for judgment. This can occur in civil and criminal cases. Judges are very careful about granting such motions because doing so prevents the case from moving to a jury trial -- which the Constitution lists as a right of defendants in criminal cases. As a result, prosecutors have a particularly high burden of proof to succeed with a motion for judgment.
Motions for judgment can only be made before a case goes to a jury. The party making the motion must have its case arguments already on file. In criminal cases where the trial occurs because of a grievous error or unconstitutional action, such as a false arrest, police misconduct, or a lack of any evidence whatsoever, the defense can motion for summary judgment -- meaning no further evidence is required to determine the case isn't valid.
In criminal cases, pleadings determine whether motions for judgment can succeed. The prosecution can motion of judgment or summary judgment, but if the defendant enters a not guilty plea, the changes of obtaining judgment or summary judgment are very slim. Criminal defendants have the right to judged by a jury. In cases with no "no contest" or "guilty" pleas, judgment usually follows, although judges can opt to defer judgemnt and sentencing while they consider a matter.
When a party motions for judgment, it has to produce evidence to support its request. In both civil and criminal cases, evidence has to prove every part and element of the case. For example, if a plaintiff motions for judgment in a civil lawsuit over an unpaid debt, he must have a signed contract for the debt, evidence of money going to the defendant and evidence that the defendant did not repay the loan per contract terms. He may even need proof that the defendant made no effort or refused to service the debt. However, if the defense has any valid evidence contradicting the plaintiff, the motion for judgment will not likely be granted.
A judge has only a few choices when presented with a motion for judgment or summary judgment. She can deny the motion, in which case she will either require another hearing or order the case to move forward to trial. In civil cases, a judge can also order discovery or mediation. If the judge grants the motion, then he must devise a civil case verdict or criminal sentence. However, most states do not require judges to do this immediately. Judges may take time to deliberate. Deferred sentencing requires another hearing, while civil verdicts can be delivered by written order which comes to the parties by mail.