Leger is generally an unorganized, unstructured, spontaneous game (such as kids might play in the yard) while spiller is the opposite: structured, planned, with rules (such as a board game, a video game, etc).
The same goes for the equivalent nouns en leg and et spil which both translate to a game. Notice that these are used in strict pairs to describe doing the activity:
- Vi leger en leg, but
- Vi spiller et spil, both of which mean we play a game.