I am currently on a 3 Gallon tank , with 2 Corydoras and a betta, the tank is too small and the worse thing is that the tank is divided as the betta kept nipping the corydoras.

I decided to upgrade to a 10 Gallon , but will the betta continue to nip the Corydoras? I find it really sad to keep the betta separated or placing it in a small tank, as i wont have any more space to put the 3 Gallon.

And next ,after adding 1 or 2 more corydoras, what is suitable , yet hardy for tankmates for betta?

Lastly , after adding those tankmates , what if the betta attack it? Do i have to keep the tank separated?

In anything smaller than a 5 gal, a betta should be left alone. Cories do better when kept in groups of 5-6, they are a schooling fish. A 10 gal would definitely be better for them. I can't say if your betta will continue to nip and harass, some just need to live solitary lives, the phrase does not play well with others comes to mind.
If you do upgrade to the 10, try with the cories first, then add the betta maybe a week after. It might make him not feel like the other fish are invading his territory, and therefore less hostile.

As someone mentioned cories do best in groups of 5-6 with a minimum of four of the same species. Depending on what species it is you could easily get away with 4. One of my concerns is that cories are really sensitive to water parameters--even the hardy ones--and won't do well if you plan on doing a fish in cycle for the 10 gallon tank. On the other hand three gallons really doesn't provide them with the swimming space they need especially since the tank is divided.

It's uncertain how the betta will react in the larger tank. It is entirely possible that he was just majorly stressed because he was sharing his smaller tank with two buddies. I would heavily plant the new tank (with fake or real plants whatever you prefer) and add the cories before the betta. Having four cories as opposed to two might help the situation as well. I had a betta with one cory before I knew better and he would hunt the cory down even though the cory was there first. When I got more cories he got less nippy. I would have a back up plan because he might just not be suitable to live with tank mates.

As for the other question about what other tank mates are suitable for the betta: right now I would focus on the cories. If your betta can't live with cories without being nippy I don't know if he could really live with anything else. Most of the cory species sold in pet stores are small, fast swimmers but fairly inactive, and stay out of the way of bettas. If he can't deal with those I don't know how he would handle something that actually swims in the same section in the tank as him and is probably more brightly colored than a cory.

Yeah if he cannot handle cories... I wouldn't know what to recommend. I have had mine with danios (they learned he's the man :p) balloon mollies (more docile than regular mollies), guppies (male and female), tetra, snails...
But it definitely depends on your betta's attitude. One of my males would tear everything to shreds. Another would hide. The other couldn't care less... and another would be inclined to chase.

What I learned, is that you should take out the betta, rearrange the plants and ornaments, put the other fish in, float the betta in a clear container or bag (or breeder's net if you have one), then introduce him. Then it is firstly not his territory right off the bat, and the rearranging will have everyone choose new territory anyways.