Apple have stated in the past that one of the features of iMessage is that they can't decrypt them and the fact that this court case exists seems to suggest they weren't just saying that (also, if they're caught in that lie, assuming it is one, the PR fallout would be enormous).
I'm not sure how they can't decrypt them, since iMessages are synced quickly and easily across all devices that share the same Apple ID (if you want them to), so you'd just assume that since Apple knows your ID it would be able to decrypt the messages themselves that clearly pass through their servers.
What I assume must be the case is that they don't know what your Apple ID password is, only the hash of it, and the only thing they can do it reset it. Now, this would mean that if they wanted to they could reset the password to something they know and then be able to decrypt your iMessages, but you'd obviously know if they did this.
I'm not knowledgeable enough to know if an end-to-end encryption system set up by a third party that is locked by an account and password can be designed to be totally secure (in content terms) from the system owner, akin to having Apple send messages inside locked safes between different users and being able to provide you with a way to make a key that can open them without having the ability to use that key itself.