I believe this matter was discussed earlier in the generic "Dragonmech questions" thread. If I recall, the answer was more or less: use your best judgement.
In the campaign I run, I just wing it mostly based on criteria like "how much of a challenge was it?" and "how generous am I feeling today?" You could estimate the challenge rating of a mech by perhaps finding comparable monsters, and if you determined a challenge rating for the PCs mech use that instead of the characters' levels when determining XP for encounters while in the mech.
You could also determine a challenge rating after the encounter based on how much of the characters' resources it used. I don't have the DMG handy, but it says something like four characters of the same level as the monsters CR should use about 25% of their available resources to defeat it. So if your characters are level 5 and they used about 25% of their hit points, memorized spells, etc it should be a CR 5, and you can obviously adjust that upward or downward depending on whether it was easier or harder.
So yeah, to sum up: use your best judgement.
