well we need more info. is this in the kitchen? is it real critical for appearance? you need a nice level about a two footer. if your gonna buttit up against a furdown you shouldnt have to worry to much about horizontal leveling but check the furdown anyway.
inside the cabinet at the top is whats called a ledger. that is where you screw thru into the wall and hopefully hit a stud. you probably will even hit whats called the top plate inside the wall. it two horizontally run 2X4's inside the wall. it extends down about 2.5 inches from the ceiling.
the reason im telling you that is because you wont have to find a stud, its easier just to screw into the top plate because it will run the width of the cabinet.
use about a 3 inch screw and you should be fine.