Maxwell Technologies Inc, a developer of battery technology, said on Monday it had agreed to be bought by electric-car maker Tesla Inc for $218 million.