Well... there's about a million different ways you could do that, all depending on how your mission is designed. The simplest one that comes to mind would just be the number of enemies on the map. Harder difficulty=more enemies.
In editing terms, there is an easy way to do this. In the unit's "condition of presence" field, just write something like:
Param1 >= 2
Where "param1" is the difficulty setting, as defined in your description.ext. So param1 == 1 might be "easy", param1 == 2 might be "medium" and param1 == 3 might be "hard". So in the above example, the soldier would only exist when the difficulty was set to "medium" or "hard".
Some other ways you can adjust the difficulty would be to change the skill of the AI (via the "setskill" command); give the players less help (less units in their squad, less arty/air support, less reinforcements, etc); add or remove objectives; give the enemies less help (less units as described above, or less arty or less air support etc); and a million and one other things. It all depends on your mission.