I was a student and I was not financially stable. I applied for a credit card as I needed some extra money but it got rejected. Because I did couple of mistakes and learnt the lesson. This might be helpful for you to know what is the best time to apply for a credit card.
Always apply for the credit card when you are financially strong. All the credit card providers check your financial status before they approve your application. If you have assets ( Motor Vehicles, House, Furniture ) or good bank balance that will indicate a strong financial status. Also, It is always good to show a good income. In such situation it is easy get your credit card application approved plus you will get a good credit balance.
Most of the time we will look in to loans and credit cards when we are having financial problems. Then it is too late for these options and normally banks or credit card companies are not happy to take that sort of risk.
There will be ups and downs with your financial conditions and alway try to get it stronger when it is strong and not when you are weak.