Are there people already in your company who could do the job? . . . Will the project require a full-time or long-term commitment? . . . Would it make sense to hire a regular employee? . . .
Use a consultant when you don't have a regular need for this service (for instance, the job is specialized and requires only a few hours a month), or a project would lead you into unfamiliar and risky territory.