How to export and import a 3d model into Babylon
I'm assuming you are referring to babylon.js.

In general, all but the most simple materials are not directly transferable between different rendering engines, so many complex custom cycles materials will never be able to be directly exported to another program.

Based on it's documentation, it supports obj,stl and gltf import formats. Of these, gltf is the most sophisticated and so is probably your best bet.

There is a gltf plugin available for blender here:
https://github.com/KhronosGroup/glTF-Blender-Exporter
This plugin seems to support exporting materials if you use specially provided node groups to create those materials.