The difference between PEM and DER is only the way how it is stored. DER is binary form and PEM is base64 encoded file (with "header"). As DER is more or less raw form you can store just one object in the file.
In case you need more objects (e.g. key and cert) you need PEM encoded form where based on the "header" is possible to differentiate the objects (in the file the objects follow each other) or some specific container format like PKCS12 (also supported by openssl).
For openssl you can use options inform
and outform
to specify if you are interested in PEM (default so used in case you don't request DER) or DER.
For the key (let assume rsa) - as PEM is default following commands are equal:
openssl rsa -in <file_with_key> -out <new_der_key_file> -outform DER
openssl rsa -in <file_with_key> -inform PEM -out <new_der_key_file> -outform DER
For the certificate - also two equal forms :
openssl x509 -in <cert_file> -out <new_der_cert> -outform DER
openssl x509 -in <cert_file> -inform PEM -out <new_der_cert> -outform DER
In case of pkcs12 container (if supported the transformation would be done during import if needed):
openssl pkcs12 -export -in <cert_file> -inkey <key_file> -out <pkcs12_file>.p12