The only plausible way to find your boyfriend's passcode is to either manage to guess it, or alternatively, you could try to watch him entering it.
Technically, you could install a program on his phone which would capture the passwords he uses, but getting that onto his phone would either require knowing his passcode and accessing his phone, or getting him to download a malware program (which would take some technical know-how).
If you're going to attempt to guess it I'd note that many people use special dates as their passcodes. For example, if your boyfriend's birthday is 1st January, you could try entering the code 0101.
Having said that, there are a few reasons why you shouldn't try to access something that your boyfriend has put a passcode on:
Invasion of personal space
Just because your boyfriend has put a passcode on something, it doesn't mean that he's hiding anything from you. Using a passcode is a perfectly normal thing to do. By trying to access information behind his back you're invading his personal space.
Breach of trust
It's fair to say that most people don't expect their partner to try to "hack" their passcodes. Your boyfriend will most probably be pretty unhappy if he discovers that you're trying to find his passcode behind his back. This could cause a major strain on your relationship, and trust is one of the most difficult things to earn back once it's been lost.
If you're concerned that your boyfriend is hiding something from you then you should ask him about it. It's much better to be honest than try to find things out behind his back.
If your boyfriend won't allow you to see what's behind the passcode then you're probably right to think that there's something he doesn't want you to see. Having said that, it's more likely that he'll just tell you what the passcode is.