Both carry meaningful story weight. Kingdom Hearts Coded sets up what Sora is meant to do next after the events of KH2, explaining the contents of Mickey's letter at the end of that game and what prompted him to write it. That said, if you've already played Birth by Sleep and seen the secret ending "Blank Points," you likely have a good sense of Sora's next steps, so Coded may feel less essential.
As for Kingdom Hearts 3D, it takes place after KH2 and Coded. Tetsuya Nomura has compared it to Chain of Memories, which suggests 3D may serve a similar bridging role to KH3 that CoM once did for KH2.