File a motion for summary judgment

When would it be appropriate for a defendant to file a motion for summary judgment?