Are you talking about BYC or for it to be permissible in court?
In the case of BYC, it's written into the user agreement that you "sign" when you register. By posting you're agreeing to the terms of use and one of those is that they can use whatever you post here.
In the case of prosecution, it's covered under the Fair Use clause. Fair Use of copyrighted materials is allowed in a variety of instances. If you're briefly quoting another author, for instance, or if you've derived inspiration from another artist's work. As long as you haven't directly copied and are not competing with the original author/artist in such a way as to reduce the market for their work, generally speaking, you'll probably be covered under Fair Use. Court proceedings are an extension of this clause and it has been repeatedly upheld that use of a defendant's copyrighted materials are permissible as evidence against them in court proceedings.
ETA: Something to understand is that copyright laws (and their related consequences) have been written to protect people whose work is intellectual in nature. IOW, to protect the marketability of the work. If someone took your posts from here and wrote a book based on your life using them to shape it, that'd be an infringement on your copyright and defendable because they'd be making money off it... thus reducing the money you could make. If someone sold the pictures you posted here, that'd be copyright infringement. Because your posts and pictures aren't marketable materials though you'd be hard pressed to defend them under copyright laws unless someone else took them and somehow made them marketable and then you could go after that.