Fr John Zuhlsdorf has a helpful list of 20 tips for making a good confession which I recommend.
A couple of things I added in the combox in response to others:
If the priest is harsh
Don't waste energy being cross with him or feeling sorry for yourself. God is infinitely good and everything that he allows to happen to us can work to our good by his grace. In the past, I have found that it has challenged me on some sin that I have become a bit blasé about and it has done me good.
But also, pray for the priest. He is running a great risk here. If souls are lost because of his harshness, he is going to have a lot of explaining to do to Our Lord when he meets him.
If the priest doesn't give a penance
(Apparently this happened quite a bit in San Diego.) First of all, ask him "Father, would you please give me a penance." He may just have forgotten. If he refuses to do so, you could first of all accept this refusal as a penance in itself (these things are annoying, aren't they?) Then you could voluntarily impose a penance on yourself, perhaps a decade of the rosary. These would be pious acts, not necessary to the validity of the sacrament.
I just checked Cappello and he says that although the imposition of a penance is necessary for the integral celebration of the sacrament, omitting it does not make the absolution invalid. So you can rest assured, go to communion, it is the priest's sin, not yours.
Again, pray for the priest because he is obliged by the teaching of the Council of Trent and required by canon law to impose a salutary penance if you have actually sinned. He may well have to do the all these penances himself in purgatory. Added to which, it was always considered grave matter to omit giving a penance unless there is an excusing cause.