H1B TO B1/B2

Which form do I need to fill to transfer H1B TO B1/B2?

Should I transfer to B1 or B2?

Should I file it before my last day in the company? Or, can I apply after my last day as well?

You need to apply for COS, which is form I-539. You should apply for it before your last day at current employer so that is is already pending when you stop working.