So, the first thing you need to do is unlock 'Expert' difficulty. You do this by beating the devil on 'Regular'.
Now to S rank a level you need to beat any boss level meeting certain criteria. The top rank for the run and gun levels is different. That's a P rank (For Pacifist) and has different criteria.
The criteria for an S Rank are:---------------------------------
1. Play on Expert
2. Don't get hit at all.
3. Get at least three parries in.
4. Hit it with lots of Super Specials - the special moves you have to save up the cards for.
5. Beat it fairly quickly. I believe you need to aim to beat most if not all in under 2 minutes. Though in my example below you'll see it still gave me the S rank even though I took a little over 2 minutes.
The setup might vary slightly from level to level, I would suggest this is easier to do on a platform than an aeroplane level unless you happen to be really awesome at the plane levels and suck at platforming.
For most platforming levels I recommend:------------------------------------------------
1. The Boomerang shot. It does decent damage and if you keep your finger on the trigger and end up shooting away from the boss while you're dodging the hits will swing back and score anyway.
2. The Smoke Bomb. Very good for dodging.
3. Alternatively the Coffee. If you're finding it easy to dodge, but you're struggling to get the boss done in a fast enough time this will give you more high-damage super specials and will speed the fight up.
4. The first super special. It does decent damage, is easy to aim and it give you a split-second of invulnerability which can get you out of a tight spot.
I would avoid:-1. The green homing shots - they just don't do enough damage for you to beat the boss in time.
2. Any extra heart boosts. If you get hit, you lose the S rank no matter how many hearts you have left.
The easiest level to do this on is probably the first one 'Botanic Panic' as you progress through the game the levels get harder and harder so naturally an S rank gets harder and harder to achieve.
In this example I beat the Ribby & Croaky boss:-