As per the (new) "Working with Elements" guide from the docs, it works the same as from your templates.
The actual list of available parameters depends on the element type. They are identical to the parameters available to your templates.
So this template example:
{% craft.entries.section('news').myPlaintextField('xyz').myLightswitchField(1) %}
Works from your plugin like so:
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->section = 'news';
$criteria->myPlaintextField = 'xyz';
$criteria->myLightswitchField = 1;
Using custom field parameters is a fast and reliable solution if you are looking for EXACT matches. I would only use the search
parameter if there's no other solution.