Bring at Least One Buddy if Possible. Find an intrepid friend or group of friends to help you assess the situation. If you're not positive, and your friend has "a bad feeling about this," reconsider. If all looks good and you proceed, then if someone gets hurt you've got a spare pair of legs to go for help. Homeless people and drug addicts tend to linger in abandoned places (trust me on this one); and in the event that you surprise someone, you're less likely to get chased or attacked if you've got company
What Else Do I Bring? NO alcohol, NO drugs, and NO weapons -- with the exception of a solid knife (check state regulations and make sure yours is legal to carry). I recommend a climber's blade or a Gator knife -- they're very sharp, and they fold closed/open with one hand. They're nasty looking when brandished, in the event you need to threaten someone away; and they're sturdy enough to be useful if you find yourself in trouble. Bring ye also a Mag Light. I recommend the little ones. Plenty of light, easy to tote.
Anything Else? A cell phone, if you've got one. A camera or a sketch pad & pencils (I'll address this later). Also, a first-aid kit wouldn't hurt, but you could probably leave that in the car. Ditto your identification -- leave it in the car [see comments for elaborated explanation of why]. In case of worst case scenario: leave a note at home telling someone where you've gone, and when to expect you back.
What Do I Wear? Combat boots, if you've got them. And the thickest jeans/pants you've got -- I don't care how hot it is. Stuff a pair of heavy-duty gardening gloves in your pockets, just in case. However, you may want to wear sleeves long enough to cover any tattoos, take out your facial piercings, and leave the "COP KILLER" t-shirt at home. In the event that you are caught, it is important to look as wholesome and innocent as possible.
Getting Caught. So you got caught by (a). The property owner or (b). The cops or (c). Both. Aren't you glad you didn't bring any illegal weapons, alcohol, or drugs -- and you haven't been stealing stuff? As long as you're clean of these things (and spray paint. Leave the spray paint.), seven times out of ten you'll be chased off the property with a warning. If you want to boost your "Getting off Scott-Free" ratio to about nine out of ten, carry a camera or a sketch pad. These things demonstrate that you are there with NO INTENTION WHATSOEVER to vandalize -- and indeed, you are there preserving the location on film or paper. Tell them you're an artist. Tell them you're a photographer. Wibble sadly at the nice police officer, who is only doing his or her job by accosting you.
If at all Possible, Be a Woman [or have a woman in your party]. In most places, the statistical majority of the cops are men, and this can work in your favor. In my experience (which is by no means comprehensive, but is probably indicative of the general treatment of female trespassers), male officers tend to be dismissive of female trespassers. They assume right off the bat that a woman is probably is only snooping. Sexist? Sure. But if you're the same kind of benign trespasser I am, then they're right -- and the sooner he reaches that conclusion, sooner he'll send you on your way.*
Remember Why Law Enforcement Officials Want To Keep You Out. They're not out to spoil your fun, they're trying to protect nosy people like you. As mentioned early on in this little diatribe, many abandoned places are not safe. The authorities would rather throw you out than be forced to rescue you later, because you took a wrong step and fell through the floor. Furthermore, whoever owns the property is not interested in having you sue them because you stepped on a rusty nail and got eaten up with Tetanus.