/kæn/ is the stressed form. This is used:
1) When 'can' is not followed by another verb. For example:
You can't speak German, can you? /kæn/
Yes I can. /kæn/
2) When you particularly want to emphasise the 'can'. For example:
You can't speak German, can you? /kæn/
Yes I can speak German! /kæn/ In fact, I grew up in Germany.
/kən/ is the unstressed form. You use this when it is followed by a main verb and the main verb is more important than the 'can', so it isn't emphasised.
What can you do to help in the house? /kən/
Well, I can cook and I can sew. /kən/
Here's a joke. It's a word play on the word 'handy'. 'Handy' means convenient or within easy reach, and a 'handyman' is a person who helps with general maintenance and manual work. All of the 'cans' are unstressed /kən/, apart from the last one, which is stressed /kæn/.
I've come to apply for the job of handyman.
OK, what can you do? Can you do carpentry?
No.
Can you do you plumbing?
No.
Can you do electricals?
No.
Can you do painting and decorating?
No.
So what CAN you do?
Nothing.
So what 'handy' about you, then?
I live next door.