If you're not able to anchor your mounting screws into wall studs, there are several options for wall fasteners that you may wish to use. Depending on the weight of the cabinet, you may be able to use simple drywall anchors (Image 1). These are placed in pre-drilled holes in the drywall, and they expand as screws are tightened down in them. For heavier cabinets, you may prefer to use toggle bolts, which hold tight against the back of the drywall when installed (Image 2). When pre-drilling holes for toggle bolts, make sure to use a bit large enough to allow the toggle to be inserted. A third option is an expanding bolt that functions much like a toggle bolt or anchor and expands as it's screwed in place (Image 3).
Important: Place the bolts through the pre-drilled holes in the cabinet, and install the toggles before screwing the cabinet onto the wall.