The following openssl command can be used to convert a certificate in .pem format to .der format:
# openssl x509 -in MYCERT.pem -inform PEM -out MYCERT.der -outform DER
The following openssl command can be used to convert a certificate in .pem format to .cer format:
# openssl x509 -in MYCERT.pem -inform PEM -out MYCERT.cer -outform DER
For more information, please see the OpenSSL x509 documentation available here.