When you ask people to do something, this phrase lets them know that they don't have to do it immediately. They can do it at a time that's convenient for them.
Here's an example:
Can you help me with this when you get a chance?
If you leave "when you get a chance" off, it sounds like you want immediate help:
Can you help me with this?